25 lines
784 B
Diff
25 lines
784 B
Diff
|
diff -up tornado-4.2.1/tornado/util.py.argspec tornado-4.2.1/tornado/util.py
|
||
|
--- tornado-4.2.1/tornado/util.py.argspec 2015-10-14 13:07:58.133043900 +0200
|
||
|
+++ tornado-4.2.1/tornado/util.py 2015-10-14 13:09:03.530841229 +0200
|
||
|
@@ -18,6 +18,11 @@ import os
|
||
|
import sys
|
||
|
import zlib
|
||
|
|
||
|
+try:
|
||
|
+ from inspect import getfullargspec as getargspec
|
||
|
+except:
|
||
|
+ from inspect import getargspec
|
||
|
+
|
||
|
|
||
|
try:
|
||
|
xrange # py2
|
||
|
@@ -284,7 +289,7 @@ class ArgReplacer(object):
|
||
|
def __init__(self, func, name):
|
||
|
self.name = name
|
||
|
try:
|
||
|
- self.arg_pos = inspect.getargspec(func).args.index(self.name)
|
||
|
+ self.arg_pos = getargspec(func).args.index(self.name)
|
||
|
except ValueError:
|
||
|
# Not a positional parameter
|
||
|
self.arg_pos = None
|