[Zope3-checkins] CVS: Zope3/lib/python/Persistence - patch.py:1.7

Jeremy Hylton jeremy@zope.com
Mon, 2 Dec 2002 16:46:57 -0500


Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv5601

Modified Files:
	patch.py 
Log Message:
Qualify references to PicklingError.

caught by pychecker


=== Zope3/lib/python/Persistence/patch.py 1.6 => 1.7 ===
--- Zope3/lib/python/Persistence/patch.py:1.6	Fri Nov 22 15:08:21 2002
+++ Zope3/lib/python/Persistence/patch.py	Mon Dec  2 16:46:56 2002
@@ -238,13 +238,14 @@
                 self.save_global(object, tup)
                 return
             if type(tup) is not TupleType:
-                raise PicklingError, "Value returned by %s must be a " \
-                                     "tuple" % reduce
+                raise pickle.PicklingError("Value returned by %s must be a "
+                                           "tuple" % reduce)
 
             l = len(tup)
             if (l != 2) and (l != 3):
-                raise PicklingError, "tuple returned by %s must contain " \
-                                     "only two or three elements" % reduce
+                raise pickle.PicklingError("tuple returned by %s must "
+                                           "contain only two or three "
+                                           "elements" % reduce)
 
             callable = tup[0]
             arg_tup  = tup[1]
@@ -254,8 +255,9 @@
                 state = None
 
             if type(arg_tup) is not TupleType and arg_tup is not None:
-                raise PicklingError, "Second element of tuple returned " \
-                                     "by %s must be a tuple" % reduce
+                raise pickle.PicklingError("Second element of tuple "
+                                           "returned by %s must be a "
+                                           "tuple" % reduce)
 
             self.save_reduce(callable, arg_tup, state)
             memo_len = len(self.memo)