Fix excessive number of returns.

This commit is contained in:
Rafael Guterres Jeffman
2021-04-29 19:57:23 -03:00
parent 95cdd43a0a
commit 2545f9702b
2 changed files with 7 additions and 19 deletions

View File

@@ -294,16 +294,8 @@ else:
# If both args and ipa are None, return there's no difference.
# If only one is None, return there is a difference.
# This tests avoid unecessary invalid access to attributes.
if args is None and ipa is None:
return True
if args is None or ipa is None:
module.debug(
base_debug_msg + "args is%s None an ipa is%s None" % (
"" if args is None else " not",
"" if ipa is None else " not",
)
)
return False
return args is None and ipa is None
# Fail if args or ipa are not dicts.
if not (isinstance(args, dict) and isinstance(ipa, dict)):