mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-11 05:24:56 -05:00
Disable message about log in ipa-backup if IPA is not configured
Introduce server installation constants similar to the client but only tie in SERVER_NOT_CONFIGURED right now. For the case of not configured don't spit out the "See <some log> for more information" because no logging was actually done. In the case of ipa-backup this could also be confusing if the --log-file option was also passed in because it would not be used. https://pagure.io/freeipa/issue/6843 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
1adc941d1f
commit
648d7c0d38
@@ -32,6 +32,10 @@ from ipapython import version
|
||||
from ipapython import config
|
||||
from ipapython.ipa_log_manager import standard_logging_setup
|
||||
|
||||
SUCCESS = 0
|
||||
SERVER_INSTALL_ERROR = 1
|
||||
SERVER_NOT_CONFIGURED = 2
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -301,7 +305,9 @@ class AdminTool(object):
|
||||
if error_message:
|
||||
logger.error('%s', error_message)
|
||||
message = "The %s command failed." % self.command_name
|
||||
if self.log_file_name:
|
||||
if self.log_file_name and return_value != 2:
|
||||
# magic value because this is common between server and client
|
||||
# but imports are not straigthforward
|
||||
message += " See %s for more information" % self.log_file_name
|
||||
logger.error('%s', message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user