Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for CodeQL #2449

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
):
def decorator_log_exception(function):
@functools.wraps(function)
def wrapper_log_expection(*args, **kwargs): # pylint: disable=R1710
def wrapper_log_exception(*args, **kwargs): # pylint: disable=R1710
try:
return function(*args, **kwargs)
except catch_exception as e:
Expand All @@ -77,8 +77,9 @@
if exception_to_raise:
raise exception_to_raise
raise
return None

Check warning on line 80 in cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py

View check run for this annotation

Codecov / codecov/patch

cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py#L80

Added line #L80 was not covered by tests

return wrapper_log_expection
return wrapper_log_exception

return decorator_log_exception

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

describe file('/usr/local/bin/cloudwatch_agent_config_util.py') do
it { should exist }
its('sha256sum') { should eq '980b0ba6e5922fe2983d3e866ac970622f59a26a4829b8262466739582176525' }
its('sha256sum') { should eq 'b816b4891a5e8f1e7ac94616db7927f7955ba72a8f53ec1b320402a2ac9c9b7f' }
its('owner') { should eq 'root' }
its('group') { should eq 'root' }
its('mode') { should cmp '0644' }
Expand Down
Loading