]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make catched exception more specific and correct a comment.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 30 Dec 2015 19:00:08 +0000 (21:00 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 30 Dec 2015 19:00:08 +0000 (21:00 +0200)
Lib/test/pickletester.py

index d3739ce1aa3cd2469257171a30472229eb3284af..fba110b14af2ef13e6cfe14f8a767f399f6df732 100644 (file)
@@ -1944,15 +1944,15 @@ class AbstractPickleTests(unittest.TestCase):
                 # 5th item is not an iterator
                 return dict, (), None, None, []
 
-        # Protocol 0 is less strict and also accept iterables.
+        # Python implementation is less strict and also accepts iterables.
         for proto in protocols:
             try:
                 self.dumps(C(), proto)
-            except (pickle.PickleError):
+            except pickle.PicklingError:
                 pass
             try:
                 self.dumps(D(), proto)
-            except (pickle.PickleError):
+            except pickle.PicklingError:
                 pass
 
     def test_many_puts_and_gets(self):