Cache password is now a function. This is so others can call it
This commit is contained in:
parent
7f59f0fdd6
commit
f679b49070
|
|
@ -770,6 +770,12 @@ def load_automatic_instructions(*args, **kwargs):
|
||||||
|
|
||||||
return instructions
|
return instructions
|
||||||
|
|
||||||
|
def cache_diskpw_on_disk():
|
||||||
|
if not os.path.isfile(args['pwfile']):
|
||||||
|
#PIN = '0000'
|
||||||
|
with open(args['pwfile'], 'w') as pw:
|
||||||
|
pw.write(args['password'])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
update_git() # Breaks and restarts the script if an update was found.
|
update_git() # Breaks and restarts the script if an update was found.
|
||||||
update_drive_list()
|
update_drive_list()
|
||||||
|
|
@ -809,10 +815,7 @@ if __name__ == '__main__':
|
||||||
if(input('Are these settings OK? (No return beyond this point) N/y: ').lower() != 'y'):
|
if(input('Are these settings OK? (No return beyond this point) N/y: ').lower() != 'y'):
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if not os.path.isfile(args['pwfile']):
|
cache_diskpw_on_disk()
|
||||||
#PIN = '0000'
|
|
||||||
with open(args['pwfile'], 'w') as pw:
|
|
||||||
pw.write(args['password'])
|
|
||||||
#else:
|
#else:
|
||||||
# ## TODO: Convert to `rb` instead.
|
# ## TODO: Convert to `rb` instead.
|
||||||
# # We shouldn't discriminate \xfu from being a passwd phrase.
|
# # We shouldn't discriminate \xfu from being a passwd phrase.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue