88args = parser .parse_args ()
99
1010TEMP_CACHE = f"{ CACHE } /workspace"
11+ temp_file = f"{ CACHE } /temp_file"
1112
1213# Cleanup the cache dir before saving
1314def cleanup_cache_dir ():
@@ -21,7 +22,6 @@ def cleanup_cache_dir():
2122
2223# Get password entered in the "Create a new password" dialog from the temporary file
2324def get_password ():
24- temp_file = f"{ CACHE } /temp_file"
2525 if os .path .exists (temp_file ):
2626 with open (temp_file ) as tmp :
2727 return tmp .read ().strip ()
@@ -31,8 +31,8 @@ def get_password():
3131
3232# Remove above temporary file
3333def remove_temp_file ():
34- if os .path .exists (f" { CACHE } / temp_file" ):
35- os .remove (f" { CACHE } / temp_file" )
34+ if os .path .exists (temp_file ):
35+ os .remove (temp_file )
3636
3737class Create :
3838 def __init__ (self ):
@@ -159,7 +159,7 @@ def __handle_sync_error(self):
159159
160160 # Unpack a legacy archive with Tarball (for backward compatibility)
161161 def _unpack_tar_archive (self ):
162- cmd = subprocess .run (["tar" , "-xzf" , self .import_file , "-C" , f"{ TEMP_CACHE } " ],capture_output = True , text = True , check = True )
162+ cmd = subprocess .run (["tar" , "-xzf" , self .import_file , "-C" , f"{ TEMP_CACHE } " ], capture_output = True , text = True , check = True )
163163 print (cmd .stdout )
164164
165165 # Replace original /home/$USER path with actual path in the dconf-settings.ini file and other XML files
0 commit comments