Skip to content

Commit aedd648

Browse files
committed
check command state before accessing return value
1 parent a71ea61 commit aedd648

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/src/main/python/opengrok_tools/scm/mercurial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def strip_outgoing(self):
157157
# If the 'hg out' command fails for some reason, it will return 255.
158158
# Hence, check for positive value as bail out indication.
159159
#
160-
if status > 0:
160+
if cmd.getstate() != Command.FINISHED or status > 0:
161161
return False
162162

163163
revisions = list(filter(None, cmd.getoutputstr().split("\n")))

0 commit comments

Comments
 (0)