[Zodb-checkins] SVN: ZODB/branches/blob-merge-branch/src/ZODB/ Use ZODB_BLOB_TEMPDIR as blob dir in TmpStore (during savepoints).

Chris McDonough chrism at plope.com
Mon Feb 27 18:55:33 EST 2006


Log message for revision 65549:
  Use ZODB_BLOB_TEMPDIR as blob dir in TmpStore (during savepoints).
  

Changed:
  U   ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt
  U   ZODB/branches/blob-merge-branch/src/ZODB/Connection.py

-=-
Modified: ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt
===================================================================
--- ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt	2006-02-27 23:45:57 UTC (rev 65548)
+++ ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt	2006-02-27 23:55:33 UTC (rev 65549)
@@ -22,7 +22,6 @@
     >>> from ZODB.DB import DB
     >>> import transaction
     >>> import tempfile
-    >>> tempfile.tempdir = "/home/ctheune/blobtemp"
     >>> from tempfile import mkdtemp
     >>> base_storage = MappingStorage("test")
     >>> blob_dir = mkdtemp()

Modified: ZODB/branches/blob-merge-branch/src/ZODB/Connection.py
===================================================================
--- ZODB/branches/blob-merge-branch/src/ZODB/Connection.py	2006-02-27 23:45:57 UTC (rev 65548)
+++ ZODB/branches/blob-merge-branch/src/ZODB/Connection.py	2006-02-27 23:55:33 UTC (rev 65549)
@@ -1156,9 +1156,11 @@
             setattr(self, method, getattr(storage, method))
 
         self._base_version = base_version
+        tmpdir = os.environ.get('ZODB_BLOB_TEMPDIR')
+        if tmpdir is None:
+            tmpdir = tempfile.mkdtemp()
+        self._blobdir = tmpdir
         self._file = tempfile.TemporaryFile()
-        self._blobdir = tempfile.mkdtemp()      # XXX this needs to go to the 
-                                                # storage dependent blob area
         # position: current file position
         # _tpos: file position at last commit point
         self.position = 0L



More information about the Zodb-checkins mailing list