Fixes for unneeded abort if answer contained whitespace (#33)
This commit is contained in:
parent
5751650af3
commit
cfa97b1ea7
2 changed files with 2 additions and 2 deletions
2
debian/postinst
vendored
2
debian/postinst
vendored
|
|
@ -187,7 +187,7 @@ if "HOWDY_NO_PROMPT" not in os.environ:
|
|||
ans = input("Apply this change? [y/N]: ")
|
||||
|
||||
# Abort the whole thing if it's not
|
||||
if (ans.lower() != "y"):
|
||||
if ans.lower().strip() != "y" or ans.lower().strip() == "yes":
|
||||
print("Interpreting as a \"NO\", aborting")
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
|||
2
debian/preinst
vendored
2
debian/preinst
vendored
|
|
@ -89,7 +89,7 @@ for dev in devices:
|
|||
os.killpg(os.getpgid(sub.pid), signal.SIGTERM)
|
||||
|
||||
# Set this camera as picked if the answer was yes, go to the next one if no
|
||||
if ans.lower() == "y" or ans.lower() == "yes":
|
||||
if ans.lower().strip() == "y" or ans.lower().strip() == "yes":
|
||||
picked = dev[5:]
|
||||
break
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue