#NEWLINE# def make_persistent_password_file( path , password ) : #NEWLINE# #INDENT# 'Writes a file containing a password until deleted.' #NEWLINE# try : #NEWLINE# #INDENT# utils . delete_if_exists ( path ) #NEWLINE# with open ( path , 'wb' ) as file : #NEWLINE# #INDENT# os . chmod ( path , 384 ) #NEWLINE# file . write ( password . encode ( ) ) #NEWLINE# #UNINDENT# return path #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# utils . delete_if_exists ( path ) #NEWLINE# raise exception . PasswordFileFailedToCreate ( error = file )