BioMike commited on
Commit
cf73a14
1 Parent(s): 06bfe5a

Update utils/login.py

Browse files
Files changed (1) hide show
  1. utils/login.py +3 -1
utils/login.py CHANGED
@@ -8,7 +8,9 @@ def hash_password(access_code):
8
 
9
 
10
  def login(access_code):
11
- hashed_code = hash_password(access_code)
 
 
12
  with open("hashed_codes.txt") as file:
13
  for line in file:
14
  if hashed_code in line:
 
8
 
9
 
10
  def login(access_code):
11
+ if access_code is None:
12
+ return False
13
+ hashed_code = hash_password(access_code.replace(" ", ""))
14
  with open("hashed_codes.txt") as file:
15
  for line in file:
16
  if hashed_code in line: