Fix pylint warnings inconsistent-return-statements

Add consistent return to all functions and methods that are covered by
tox -e pylint[23]. I haven't checked if return None is always a good
idea or if we should rather raise an error.

See: https://pagure.io/freeipa/issue/7326
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Christian Heimes
2017-12-15 17:00:04 +01:00
parent a7ae2dbc5f
commit 8cb756a229
14 changed files with 85 additions and 26 deletions

View File

@@ -1005,6 +1005,8 @@ class Command(HasParam):
def get_summary_default(self, output):
if self.msg_summary:
return self.msg_summary % output
else:
return None
def log_messages(self, output):
logger_functions = dict(
@@ -1035,7 +1037,7 @@ class Command(HasParam):
Subclasses can override this method, if custom output is needed.
"""
if not isinstance(output, dict):
return
return None
rv = 0