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

Commit

Permalink
@almet review
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Jan 7, 2016
1 parent bad9d18 commit 6e9c3d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cliquet/initialization.py
Expand Up @@ -375,7 +375,7 @@ def on_new_response(event):
config.add_subscriber(on_new_response, NewResponse)


class EventsFilterActions(object):
class EventActionFilter(object):
def __init__(self, actions, config):
self.actions = actions

Expand All @@ -387,7 +387,7 @@ def __call__(self, event):
return not action or action in self.actions


class EventsFilterResources(object):
class EventResourceFilter(object):
def __init__(self, resources, config):
self.resources = resources

Expand All @@ -401,8 +401,8 @@ def __call__(self, event):

def setup_listeners(config):
# Register basic subscriber predicates, to filter events.
config.add_subscriber_predicate('for_actions', EventsFilterActions)
config.add_subscriber_predicate('for_resources', EventsFilterResources)
config.add_subscriber_predicate('for_actions', EventActionFilter)
config.add_subscriber_predicate('for_resources', EventResourceFilter)

write_actions = (ACTIONS.CREATE, ACTIONS.UPDATE, ACTIONS.DELETE)
settings = config.get_settings()
Expand Down

0 comments on commit 6e9c3d2

Please sign in to comment.