From 2edfc5be141cae3734b56bd68c0f076a7ed1a704 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Thu, 23 May 2019 12:20:35 -0400 Subject: [PATCH] Refactoring - Small code fixes. --- authentication.py | 4 ++-- search.py | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/authentication.py b/authentication.py index 3685b70..6180727 100644 --- a/authentication.py +++ b/authentication.py @@ -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") diff --git a/search.py b/search.py index 6c36091..10fec1f 100644 --- a/search.py +++ b/search.py @@ -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",