Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r55427:519e061adb07 Date: 2012-06-06 11:41 +0200 http://bitbucket.org/pypy/pypy/changeset/519e061adb07/
Log: Be even more careful. diff --git a/lib-python/2.7/pickle.py b/lib-python/2.7/pickle.py --- a/lib-python/2.7/pickle.py +++ b/lib-python/2.7/pickle.py @@ -694,7 +694,10 @@ def _pickle_maybe_moduledict(self, obj): # save module dictionary as "getattr(module, '__dict__')" try: - themodule = sys.modules[obj['__name__']] + name = obj['__name__'] + if type(name) is not str: + return None + themodule = sys.modules[name] if type(themodule) is not ModuleType: return None if themodule.__dict__ is not obj: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit