Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bpython/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def getfuncprops(func: str, f: Callable) -> FuncProps | None:
# not take 'self', the latter would:
try:
func_name = getattr(f, "__name__", None)
except:
except Exception:
# if calling foo.__name__ would result in an error
func_name = None

Expand All @@ -279,7 +279,7 @@ def getfuncprops(func: str, f: Callable) -> FuncProps | None:
or (func_name == "__init__" and not func.endswith(".__init__"))
or (func_name == "__new__" and not func.endswith(".__new__"))
)
except:
except Exception:
# if f is a method from a xmlrpclib.Server instance, func_name ==
# '__init__' throws xmlrpclib.Fault (see #202)
return None
Expand Down
Loading