Skip to content

Commit

Permalink
ipapython/admintool.py: use SERVER_NOT_CONFIGURED
Browse files Browse the repository at this point in the history
Commit 9182917 introduced
SUCCESS, SERVER_INSTALL_ERROR and SERVER_NOT_CONFIGURED to
deal with cases when server is not configured.
Actually use SERVER_NOT_CONFIGURED in log_failure instead of 2.

Related-to: https://pagure.io/freeipa/issue/6843
Signed-off-by: François Cami <[email protected]>
Reviewed-By: Alexander Bokovoy <[email protected]>
Reviewed-By: Rob Crittenden <[email protected]>
  • Loading branch information
fcami authored and Tiboris committed Jul 30, 2019
1 parent 11e4033 commit 402246a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ipapython/admintool.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ def log_failure(self, error_message, return_value, exception, backtrace):
# ipa-server-install.
return
message = "The %s command failed." % self.command_name
if self.log_file_initialized and return_value != 2:
# magic value because this is common between server and client
# but imports are not straigthforward
if self.log_file_initialized and return_value != SERVER_NOT_CONFIGURED:
message += " See %s for more information" % self.log_file_name
logger.error('%s', message)

Expand Down

0 comments on commit 402246a

Please sign in to comment.