From 2db63ed7b76a8e768953f16a0751cd8cbdc33e74 Mon Sep 17 00:00:00 2001 From: Aaron M Date: Thu, 19 May 2016 19:22:34 -0400 Subject: [PATCH] Fixed issue with Handler.before always being called --- pycnic/__init__.py | 2 +- pycnic/core.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pycnic/__init__.py b/pycnic/__init__.py index a73339b..00ec2dc 100644 --- a/pycnic/__init__.py +++ b/pycnic/__init__.py @@ -1 +1 @@ -__version__ = "0.0.8" +__version__ = "0.0.9" diff --git a/pycnic/core.py b/pycnic/core.py index 5fafdac..86572a5 100755 --- a/pycnic/core.py +++ b/pycnic/core.py @@ -240,12 +240,12 @@ def delegate(self): # Set defaults for handler handler.request = self.request handler.response = self.response - - if hasattr(handler, 'before'): - handler.before() m = re.match('^' + pattern + '$', path) if m: + if hasattr(handler, 'before'): + handler.before() + args = m.groups() funcname = method.lower() try: