summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Nugged <nugged@gmail.com>2023-06-11 16:39:44 +0300
committerSlava Shishkin <slavashishkin@gmail.com>2023-06-13 14:00:31 +0300
commit5f97df1070cf0c2f65ad9a91ea30b699b347f455 (patch)
tree01b1684251c35cfa82861454d1975bc9c2d2d7be
parentc64b4843861a23bd8c55d0bb5edfcfd9a6b762be (diff)
downloadgit-bz-5f97df1070cf0c2f65ad9a91ea30b699b347f455.tar.gz
Prevent dies when empty line enteredgit-bz-python3_adaptation
-rwxr-xr-xgit-bz7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-bz b/git-bz
index ca73576..62c5461 100755
--- a/git-bz
+++ b/git-bz
@@ -941,9 +941,10 @@ def prompt(message):
def prompt_multi(message, options):
while True:
line = input(f"{message} ")
- opt = line[0].lower()
- if opt in options:
- return opt
+ if line:
+ opt = line[0].lower()
+ if opt in options:
+ return opt
def die(message):