summaryrefslogtreecommitdiff
path: root/pecan/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/util.py')
-rw-r--r--pecan/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pecan/util.py b/pecan/util.py
index 168ff66..bdb5d2b 100644
--- a/pecan/util.py
+++ b/pecan/util.py
@@ -23,6 +23,12 @@ def getargspec(method):
func_closure = six.get_function_closure(method)
+ # NOTE(sileht): if the closure is None we cannot look deeper,
+ # so return actual argspec, this occurs when the method
+ # is static for example.
+ if func_closure is None:
+ return argspec
+
closure = next(
(
c for c in func_closure if six.callable(c.cell_contents)