summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/pickle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 2895237..f7b1d29 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -341,7 +341,7 @@ def whichmodule(cls):
import sys
clsname = cls.__name__
for name, module in sys.modules.items():
- if module.__name__ != '__main__' and \
+ if name != '__main__' and \
hasattr(module, clsname) and \
getattr(module, clsname) is cls:
break