Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 17:08:26 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 17:08:26 +0100
commitf679b49070a9a5339ed36b066f038bf3812414f1 (patch)
treeaecb93b57ca8d32e882ddba3847e42fad5b05d00 /archinstall.py
parent7f59f0fdd64bbcb010c5e12ccefeb05cbf1600dc (diff)
Cache password is now a function. This is so others can call it
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/archinstall.py b/archinstall.py
index 3ef0d2b4..26de5215 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -770,6 +770,12 @@ def load_automatic_instructions(*args, **kwargs):
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__':
update_git() # Breaks and restarts the script if an update was found.
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'):
exit(1)
- if not os.path.isfile(args['pwfile']):
- #PIN = '0000'
- with open(args['pwfile'], 'w') as pw:
- pw.write(args['password'])
+ cache_diskpw_on_disk()
#else:
# ## TODO: Convert to `rb` instead.
# # We shouldn't discriminate \xfu from being a passwd phrase.