Commit d755aeb1 authored by Chris McDonough's avatar Chris McDonough

Use ZODB_BLOB_TEMPDIR as blob dir in TmpStore (during savepoints).

parent 8c7aa5c5
......@@ -22,7 +22,6 @@ We need a database with a blob supporting storage:
>>> 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()
......
......@@ -1156,9 +1156,11 @@ class TmpStore:
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment