From 84971029eaeaa81353d30e2c45993e297a402b1a Mon Sep 17 00:00:00 2001 From: Judy Ng Date: Sun, 10 Sep 2023 14:05:16 -0400 Subject: [PATCH] Fixes for codeql Signed-off-by: Judy Ng --- .../files/clusterstatusmgtd/clusterstatusmgtd.py | 1 + .../files/cloudwatch/cloudwatch_agent_config_util.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py b/cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py index 8067f1fc88..12a3beca0d 100644 --- a/cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py +++ b/cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py @@ -77,6 +77,7 @@ def wrapper_log_expection(*args, **kwargs): # pylint: disable=R1710 if exception_to_raise: raise exception_to_raise raise + return None return wrapper_log_expection diff --git a/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py b/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py index bc0fcb3bde..c51093a53f 100644 --- a/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py +++ b/cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config_util.py @@ -158,6 +158,7 @@ def remove_backup(): try: os.remove(LOG_CONFIGS_BAK_PATH) except FileNotFoundError: + # No need to remove the file, as the file isn't found anyway pass