diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pickle.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 35ab91b..876c81b 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -943,8 +943,7 @@ def whichmodule(func, funcname): if module is None: continue # skip dummy package entries if name != '__main__' and \ - hasattr(module, funcname) and \ - getattr(module, funcname) is func: + getattr(module, funcname, None) is func: break else: name = '__main__' |