remove obsolete update code

This commit is contained in:
Lynne 2019-05-19 22:45:55 +10:00
parent 2b2824a73e
commit 5fcefd12b0
No known key found for this signature in database
GPG Key ID: FB7B970303ACE499

13
main.py
View File

@ -28,19 +28,6 @@ except:
shutil.copy2("config.sample.json", "config.json")
cfg.update(json.load(open('config.json', 'r')))
#if the user is using a (very!) old version that still uses the .secret files, migrate to the new method
if os.path.exists("clientcred.secret"):
print("Upgrading to new storage method")
cc = open("clientcred.secret").read().split("\n")
cfg['client'] = {
"id": cc[0],
"secret": cc[1]
}
cfg['secret'] = open("usercred.secret").read().rstrip("\n")
os.remove("clientcred.secret")
os.remove("usercred.secret")
if "client" not in cfg:
print("No application info -- registering application with {}".format(cfg['site']))
client_id, client_secret = Mastodon.create_app("mstdn-ebooks",