From 9b481ff3d699a055e9639fd580e515c3748d5dc4 Mon Sep 17 00:00:00 2001
From: Barry Warsaw <barry@python.org>
Date: Thu, 15 Nov 2001 23:45:26 +0000
Subject: [PATCH] A change to sync with pickle.py:

find_class(): We no longer mask all exceptions[1] by transforming them
into SystemError.  The latter is definitely not the right thing to do,
so we let any exceptions that occur in the PyObject_GetAttr() call to
simply propagate up if they occur.

[1] Note that pickle only masked ImportError, KeyError, and
AttributeError, but cPickle masked all exceptions.
---
 Modules/cPickle.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 54a115172f6..17bc7a9af31 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -2537,14 +2537,6 @@ find_class(PyObject *py_module_name, PyObject *py_global_name, PyObject *fc) {
     }
     else
       global = PyObject_GetAttr(module, py_global_name);
-    if (global == NULL) {
-      char buf[256 + 37];
-      sprintf(buf, "Failed to import class %.128s from module %.128s",
-              PyString_AS_STRING((PyStringObject*)py_global_name),
-              PyString_AS_STRING((PyStringObject*)py_module_name));
-      PyErr_SetString(PyExc_SystemError, buf);
-      return NULL;
-    }
     return global;
 }
 
-- 
2.30.9