Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Jan 27, 2016
1 parent 31c30ea commit 9de476b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cliquet/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,12 @@ def setup_listeners(config):
def notify_resource_events(success, request):
"""Notify the accumlated resource events if transaction succeeds.
"""
if not success:
return
for event in request.get_resource_events():
try:
request.registry.notify(event)
except Exception:
logger.error("Unable to notify", exc_info=True)
if success:
for event in request.get_resource_events():
try:
request.registry.notify(event)
except Exception:
logger.error("Unable to notify", exc_info=True)

def on_new_request(event):
"""When a new request comes in, hook on transaction commit.
Expand Down

0 comments on commit 9de476b

Please sign in to comment.