Skip to content

Commit

Permalink
check status first
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Jan 2, 2025
1 parent aedd648 commit 721c9aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/src/main/python/opengrok_tools/scm/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_branch(self):
cmd.execute()
self.logger.info("output of {}:".format(cmd))
self.logger.info(cmd.getoutputstr())
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
cmd.log_error("failed to get branch")
return None
else:
Expand Down Expand Up @@ -73,7 +73,7 @@ def reposync(self):
cmd.execute()
self.logger.info("output of {}:".format(cmd))
self.logger.info(cmd.getoutputstr())
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
cmd.log_error("failed to perform pull")
return 1

Expand All @@ -98,7 +98,7 @@ def reposync(self):
cmd.execute()
self.logger.info("output of {}:".format(cmd))
self.logger.info(cmd.getoutputstr())
if cmd.getretcode() != 0 or cmd.getstate() != Command.FINISHED:
if cmd.getstate() != Command.FINISHED or cmd.getretcode() != 0:
cmd.log_error("failed to perform pull and update")
return 1

Expand Down

0 comments on commit 721c9aa

Please sign in to comment.