# HG changeset patch # User Goffi # Date 1554492125 -7200 # Node ID 7e8ca7c1429a66a1e7b6e1f31066e482a294c19c # Parent 0c54970d8e6ef14dc1c5fd4278452b3d66b7ce69 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. diff -r 0c54970d8e6e -r 7e8ca7c1429a sat_frontends/jp/cmd_avatar.py --- a/sat_frontends/jp/cmd_avatar.py Fri Apr 05 21:22:03 2019 +0200 +++ b/sat_frontends/jp/cmd_avatar.py Fri Apr 05 21:22:05 2019 +0200 @@ -88,7 +88,8 @@ 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