Skip to content

Commit

Permalink
Moar tempfile prefixes for resource leak detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Feb 28, 2013
1 parent 10303c0 commit 1ab797b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ZODB/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def _create_uncommitted_file(self):
tempdir = self._p_jar.db()._storage.temporaryDirectory()
else:
tempdir = tempfile.gettempdir()
filename = utils.mktemp(dir=tempdir)
filename = utils.mktemp(dir=tempdir, prefix="BUC")
self._p_blob_uncommitted = filename

def cleanup(ref):
Expand Down Expand Up @@ -952,6 +952,7 @@ def copyTransactionsFromTo(source, destination):
pass
if blobfilename is not None:
fd, name = tempfile.mkstemp(
prefix='CTFT',
suffix='.tmp', dir=destination.fshelper.temp_dir)
os.close(fd)
with open(blobfilename, 'rb') as sf:
Expand Down

0 comments on commit 1ab797b

Please sign in to comment.