jp (avatar/get): fixed avatar being displayed 2 times in a corner case:
when avatar is shown by ImageMagick's display and it is terminated using SIGINT, the return code is 2 and not 0. Before this patch, jp was interpreting the 2 as an image not displayed and so was trying with the next available command Now it is stopping when exit code 2 is received.
This commit is contained in:
parent
7faaa9691b
commit
2f4651d22b
1 changed files with 2 additions and 1 deletions
|
|
@ -88,7 +88,8 @@ class Get(base.CommandBase):
|
|||
except OSError:
|
||||
pass
|
||||
else:
|
||||
if ret == 0:
|
||||
if ret in (0, 2):
|
||||
# we can get exit code 2 with display when stopping it with C-c
|
||||
break
|
||||
else:
|
||||
# didn't worked with commands, we try our luck with webbrowser
|
||||
|
|
|
|||
Loading…
Reference in a new issue