[Python-checkins] cpython (merge 3.5 -> default): Make catched exception more specific and correct a comment.

serhiy.storchaka python-checkins at python.org
Wed Dec 30 14:00:58 EST 2015


https://hg.python.org/cpython/rev/965f0bddac6d
changeset:   99725:965f0bddac6d
parent:      99721:0155eefa8162
parent:      99724:b35212d6d4ce
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Wed Dec 30 21:00:29 2015 +0200
summary:
  Make catched exception more specific and correct a comment.

files:
  Lib/test/pickletester.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1942,15 +1942,15 @@
                 # 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):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list