We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa857f7 commit 669a788Copy full SHA for 669a788
bpython/inspection.py
@@ -228,9 +228,14 @@ def getargspec(func, f):
228
# not take 'self', the latter would:
229
func_name = getattr(f, '__name__', None)
230
231
- is_bound_method = ((inspect.ismethod(f) and f.im_self is not None)
+ try:
232
+ is_bound_method = ((inspect.ismethod(f) and f.im_self is not None)
233
or (func_name == '__init__' and not
234
func.endswith('.__init__')))
235
+ except:
236
+ # if f is a method from a xmlrpclib.Server instance, func_name ==
237
+ # '__init__' throws xmlrpclib.Fault (see #202)
238
+ return None
239
try:
240
if py3:
241
argspec = inspect.getfullargspec(f)
0 commit comments