Skip to content

Commit

Permalink
added case for if KEY is None
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai-Denzel-Jane committed Jan 18, 2024
1 parent 4617bcc commit 85cb55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Encryption/Fernet (Local-Files)/Fernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
RESET = colorama.Fore.RESET

def load_env_variables():

os.environ.clear()
load_dotenv(dotenv_path=".env")
KEY = os.getenv("KEY")
Expand Down Expand Up @@ -485,7 +485,7 @@ def end():

KEY, PASSWORD_E, PASSWORD_D, KEY_BACKUP, DEBUG = load_env_variables()

if KEY == '':
if KEY == '' or KEY == None:
print("Either this is your first time running the script or YOU changed you key to '',no worries we are generating a new key for you.")
print("Default password is 'alpine' you should change it after")
key_gen(PASSWORD_D)
Expand Down

0 comments on commit 85cb55f

Please sign in to comment.