Refactoring - Small code fixes.

This commit is contained in:
Clayton Wilson 2019-05-23 12:20:35 -04:00
parent 7298c82ceb
commit 2edfc5be14
2 changed files with 2 additions and 7 deletions

View File

@ -37,7 +37,7 @@ def login():
tmp_user_key = input("Enter your Unique ID: ")
while tmp_api_key is "":
tmp_api_key = input("Enter your API Key: ")
except KeyboardInterrupt as e:
except KeyboardInterrupt:
print("\n")
return
@ -121,7 +121,7 @@ def refreshToken():
obj.write(json.dumps(login))
obj.close()
print("New token acquired!\n")
except Exception as e:
except Exception:
print("You need to log in first. Select Login/Change login.\n") # TODO make a set of constants for error codes
else:
print("You need to log in first. Select Login/Change login.\n")

View File

@ -39,11 +39,6 @@ def search():
print("There was an error checking your login. Try logging in again with 'Login/Change login'.")
return None
# All login checks pass and search starts
FAN_KEY_TYPE = "?keyType=fanart" # These are used in the search strings
POS_KEY_TYPE = "?keyType=poster"
BAN_KEY_TYPE = "?keyType=series"
authHeaders = {
"Content-Type": "application/json",
"Accept": "application/json",