Skip to content

Commit

Permalink
DecoratedController should not take parameters and call super.
Browse files Browse the repository at this point in the history
(object swallowed arguments in Py 2.5, but not so in 2.6 any more).
  • Loading branch information
Cito committed Jan 27, 2011
1 parent ce5062f commit 7967270
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tg/controllers/decoratedcontroller.py
Expand Up @@ -41,13 +41,12 @@ class DecoratedController(object):
controller methods for the purpose of rendering web content.
"""

def __init__(self, *args, **kwargs):
def __init__(self):
if hasattr(self, 'allow_only') and self.allow_only is not None:
# Let's turn Controller.allow_only into something useful for
# the @allow_only decorator.
predicate = self.allow_only
#self = allow_only(predicate)(self)
super(DecoratedController, self).__init__(*args, **kwargs)

def _is_exposed(self, controller, name):
if hasattr(controller, name):
Expand Down

0 comments on commit 7967270

Please sign in to comment.