Skip to content

Commit

Permalink
update_event_sources fails on SNS and S3 event sources
Browse files Browse the repository at this point in the history
Per garnaat#32 , adding an update method
for event sources that don't have them.
  • Loading branch information
ryansb committed Aug 22, 2015
1 parent a5cf44b commit d4ed0ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kappa/event_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def add(self, function):
except Exception:
LOG.exception('Unable to add S3 event source')

def update(self, function):
self.add(function)

def remove(self, function):
LOG.debug('removing s3 notification')
response = self._s3.get_bucket_notification(
Expand Down Expand Up @@ -200,6 +203,9 @@ def add(self, function):
except Exception:
LOG.exception('Unable to add SNS event source')

def update(self, function):
self.add(function)

def remove(self, function):
LOG.debug('removing SNS event source')
try:
Expand Down

0 comments on commit d4ed0ed

Please sign in to comment.