Skip to content

Commit

Permalink
get_bucket_notification_configuration to remove metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kavinnd committed Jul 15, 2021
1 parent 92b8ea1 commit 0195efe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kingpin/actors/aws/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,13 @@ def _get_notification_configuration(self):
self.s3_conn.get_bucket_notification_configuration,
Bucket=self.option('name'))

raise gen.Return(raw)
existing_configurations = {}
for configuration in ['TopicConfigurations',
'QueueConfigurations',
'LambdaFunctionConfigurations']:
if configuration in raw:
existing_configurations[configuration] = raw[configuration]
raise gen.Return(existing_configurations)

@gen.coroutine
def _compare_notification_configuration(self):
Expand All @@ -1238,8 +1244,6 @@ def _compare_notification_configuration(self):
raise gen.Return(True)

self.log.info('Bucket Notification Configuration differs:')
self.log.info(new)
self.log.info(exist)
for line in diff.split('\n'):
self.log.info('Diff: %s' % line)

Expand Down

0 comments on commit 0195efe

Please sign in to comment.