print warning after printing cfg file location

This commit is contained in:
Lynnesbian 2020-03-10 16:54:00 +10:00
parent 8db84a5656
commit ac411e15a9
No known key found for this signature in database
GPG Key ID: F0A184B5213D9F90
1 changed files with 2 additions and 2 deletions

View File

@ -35,12 +35,12 @@ try:
except FileNotFoundError:
open(args.cfg, "w").write("{}")
print("Using {} as configuration file".format(args.cfg))
if not cfg['site'].startswith("https://") and not cfg['site'].startswith("http://"):
print("Site must begin with 'https://' or 'http://'. Value '{}' is invalid - try 'https://{}' instead.".format(cfg['site']))
sys.exit(1)
print("Using {} as configuration file".format(args.cfg))
if "client" not in cfg:
print("No application info -- registering application with {}".format(cfg['site']))
client_id, client_secret = Mastodon.create_app("mstdn-ebooks",