diff --git a/run.py b/run.py index bb559dc..4b41c95 100755 --- a/run.py +++ b/run.py @@ -39,7 +39,7 @@ def blockdevice(termsize, settings): print("Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)") print("Make sure to choose a drive, not a partition.") print("Here's a list of devices that may be the right:") - settings["blockdevice"] = _ask("Install where?", os.listdir("/sys/block/")) + settings["blockdevice"] = _ask("Install where?", os.listdir("/sys/block/"), enforce=False) def checks(termsize, settings): @@ -138,11 +138,11 @@ def _separator(termsize): print("~" * termsize["cols"]) -def _ask(question, choices): +def _ask(question, choices, enforce=True): while True: print("=> %s (%s) " % (question, ", ".join(choices))) answer = sys.stdin.readline()[:-1] - if answer in choices: + if answer in choices or not enforce: return answer