running lib2to3.fixes.fix_methodattrs
This commit is contained in:
1 parent
02e0cd187a
commit
d74413bc16
2 files changed
+5
-5
No files matched your search
+1
-1
@@ -214,7 +214,7 @@ def LOAD(c=None, f='index', args=None, vars=None,
|
|||||||
request.env.path_info
|
request.env.path_info
|
||||||
other_request.cid = target
|
other_request.cid = target
|
||||||
other_request.env.http_web2py_component_element = target
|
other_request.env.http_web2py_component_element = target
|
||||||
other_request.restful = types.MethodType(request.restful.im_func, other_request) # A bit nasty but needed to use LOAD on action decorates with @request.restful()
|
other_request.restful = types.MethodType(request.restful.__func__, other_request) # A bit nasty but needed to use LOAD on action decorates with @request.restful()
|
||||||
other_response.view = '%s/%s.%s' % (c, f, other_request.extension)
|
other_response.view = '%s/%s.%s' % (c, f, other_request.extension)
|
||||||
|
|
||||||
other_environment = copy.copy(current.globalenv) # NASTY
|
other_environment = copy.copy(current.globalenv) # NASTY
|
||||||
|
|||||||
@@ -391,16 +391,16 @@ class Qdb(bdb.Bdb):
|
|||||||
pass
|
pass
|
||||||
elif inspect.ismethod(obj):
|
elif inspect.ismethod(obj):
|
||||||
# Get the function from the object
|
# Get the function from the object
|
||||||
f = obj.im_func
|
f = obj.__func__
|
||||||
drop_self = 1
|
drop_self = 1
|
||||||
elif inspect.isclass(obj):
|
elif inspect.isclass(obj):
|
||||||
# Get the __init__ method function for the class.
|
# Get the __init__ method function for the class.
|
||||||
if hasattr(obj, '__init__'):
|
if hasattr(obj, '__init__'):
|
||||||
f = obj.__init__.im_func
|
f = obj.__init__.__func__
|
||||||
else:
|
else:
|
||||||
for base in object.__bases__:
|
for base in object.__bases__:
|
||||||
if hasattr(base, '__init__'):
|
if hasattr(base, '__init__'):
|
||||||
f = base.__init__.im_func
|
f = base.__init__.__func__
|
||||||
break
|
break
|
||||||
if f is not None:
|
if f is not None:
|
||||||
drop_self = 1
|
drop_self = 1
|
||||||
@@ -408,7 +408,7 @@ class Qdb(bdb.Bdb):
|
|||||||
# use the obj as a function by default
|
# use the obj as a function by default
|
||||||
f = obj
|
f = obj
|
||||||
# Get the __call__ method instead.
|
# Get the __call__ method instead.
|
||||||
f = obj.__call__.im_func
|
f = obj.__call__.__func__
|
||||||
drop_self = 0
|
drop_self = 0
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in new issue
Block a user