From ecd5f5308a6eb30631d64ca8148f9441fed059c6 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 15 Jun 2021 05:26:53 +0200 Subject: handle empty response --- siglog-witness.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3