Skip to content

Commit

Permalink
Fix an implicit return in clusterstatusmgtd.py and add explanatory co…
Browse files Browse the repository at this point in the history
…mment in cloudwatch_agent_config_util.py (aws#2449)

Signed-off-by: Judy Ng <[email protected]>
  • Loading branch information
judysng authored and hgreebe committed Nov 13, 2023
1 parent c063262 commit 563754b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def log_exception(
):
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 @@ def wrapper_log_expection(*args, **kwargs): # pylint: disable=R1710
if exception_to_raise:
raise exception_to_raise
raise
return None

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

0 comments on commit 563754b

Please sign in to comment.