summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2021-06-15 05:26:53 +0200
committerLinus Nordberg <linus@nordberg.se>2021-06-15 05:26:53 +0200
commitecd5f5308a6eb30631d64ca8148f9441fed059c6 (patch)
treeac81655fffddc21cc1342d9681dffda00b5e03cb
parent2f2f684751f22fc290451b1497bce7bccc7ba254 (diff)
handle empty response
-rwxr-xr-xsiglog-witness.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/siglog-witness.py b/siglog-witness.py
index 4eebca5..704f989 100755
--- a/siglog-witness.py
+++ b/siglog-witness.py
@@ -327,7 +327,8 @@ def ensure_sigkey(fn):
return signing_key, None
def user_confirm(prompt):
- if input(prompt + ' y/n> ').lower()[0] == 'y':
+ resp = input(prompt + ' y/n> ').lower()
+ if resp and resp[0] == 'y':
return True
return False