mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Close when opened as module
This commit is contained in:
parent
c094986642
commit
6dddf4c685
|
@ -26,6 +26,10 @@ from collections import defaultdict, Counter
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
|
|
||||||
|
if __name__ != "__main__":
|
||||||
|
logging.critical("The file is being executed as a module. Please execute the script using the console.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open("settings.json") as sfile:
|
with open("settings.json") as sfile:
|
||||||
settings = json.load(sfile)
|
settings = json.load(sfile)
|
||||||
|
|
Loading…
Reference in a new issue