[Zodb-checkins] CVS: Zope3/lib/python/ZODB - BaseStorage.py:1.15.10.3

Jeremy Hylton jeremy@zope.com
Tue, 5 Mar 2002 00:12:33 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	BaseStorage.py 
Log Message:
Fix use of unbound local dumps (use cPickle.dumps instead).

Remove use of string module.


=== Zope3/lib/python/ZODB/BaseStorage.py 1.15.10.2 => 1.15.10.3 ===
 """
 # Do this portably in the face of checking out with -kv
-import string
-__version__ = string.split('$Revision$')[-2:][0]
+__version__ = '$Revision$'.split()[-2:][0]
 
 import threading
 import time, UndoLogCompatible
@@ -183,8 +182,11 @@
             user=transaction.user
             desc=transaction.description
             ext=transaction._extension
-            if ext: ext=dumps(ext,1)
-            else: ext=""
+            if ext:
+                import cPickle
+                ext = cPickle.dumps(ext, 1)
+            else:
+                ext = ""
             self._ude=user, desc, ext
 
             if tid is None: