File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ def decrypt_token(encrypted_token, key):
6161# Function to get or set token
6262def get_or_set_token ():
6363 key = load_or_generate_key ()
64+ token_file = os .path .join (caltechdata_directory , "token.txt" )
6465 try :
65- token = os .path .join (caltechdata_directory , "token.txt" )
66- with open (token , "rb" ) as f :
66+ with open (token_file , "rb" ) as f :
6767 encrypted_token = f .read ()
6868 token = decrypt_token (encrypted_token , key )
6969 return token
@@ -73,7 +73,7 @@ def get_or_set_token():
7373 confirm_token = input ("Confirm your CaltechDATA token: " ).strip ()
7474 if token == confirm_token :
7575 encrypted_token = encrypt_token (token , key )
76- with open ("token.txt" , "wb" ) as f :
76+ with open (token_file , "wb" ) as f :
7777 f .write (encrypted_token )
7878 return token
7979 else :
You can’t perform that action at this time.
0 commit comments