Browse Source

more info if configpath not foundwq

master
Andreas Demmelbauer 6 years ago
parent
commit
c9a953b177
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      tootbot.py

+ 6
- 3
tootbot.py View File

@@ -16,12 +16,15 @@ from datetime import datetime, date, timedelta
try:
filedir = os.path.dirname(os.path.abspath(__file__))
if len(sys.argv) < 2:
print("Using default config location: %s/config.json" % filedir)
config = json.load(open(filedir+'/config.json'))
configpath = filedir+'/config.json'
print("Using default config location: ", configpath)
config = json.load(open(configpath))
else:
config = json.load(open(sys.argv[1]))
configpath = sys.argv[1]
config = json.load(open(configpath))

except:
print("didn't find config file: ", configpath)
print("ERROR: Config file not found!")
sys.exit(1)



Loading…
Cancel
Save