浏览代码

more info if configpath not foundwq

master
Andreas Demmelbauer 6 年前
父节点
当前提交
c9a953b177
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. +6
    -3
      tootbot.py

+ 6
- 3
tootbot.py 查看文件

@@ -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)



正在加载...
取消
保存