Skip to content

Commit

Permalink
Ignores pylint issues with use of return-in-finally
Browse files Browse the repository at this point in the history
  • Loading branch information
lorengordon committed Aug 6, 2024
1 parent 5c66a3b commit 6c4327d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _modules/ash_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _rollback_fips_disable(installed_fips_pkgs):
__salt__["cmd.run"]("grubby --update-kernel=ALL --args=fips=1", python_shell=False)


def fips_disable(): # pylint: disable=too-many-branches
def fips_disable(): # pylint: disable=too-many-branches,inconsistent-return-statements
"""
Disables FIPS on RH/CentOS system.
Expand Down Expand Up @@ -212,7 +212,7 @@ def fips_disable(): # pylint: disable=too-many-branches
if "changes" not in ret and "comment" not in ret:
ret["comment"] = "FIPS mode is already disabled. No changes."
finally:
return ret # pylint: disable=lost-exception
return ret # pylint: disable=lost-exception,return-in-finally


def _rollback_fips_enable():
Expand All @@ -231,7 +231,7 @@ def _rollback_fips_enable():
)


def fips_enable(): # pylint: disable=too-many-branches
def fips_enable(): # pylint: disable=too-many-branches,inconsistent-return-statements
"""
Enable FIPS on RH/CentOS system.
Expand Down Expand Up @@ -296,7 +296,7 @@ def fips_enable(): # pylint: disable=too-many-branches
if "changes" not in ret and "comment" not in ret:
ret["comment"] = "FIPS mode is already enabled. No changes."
finally:
return ret # pylint: disable=lost-exception
return ret # pylint: disable=lost-exception,return-in-finally


def fips_status():
Expand Down

0 comments on commit 6c4327d

Please sign in to comment.