[Python-checkins] r88770 - tracker/instances/python-dev/extensions/create_patch.py

martin.v.loewis python-checkins at python.org
Sun Mar 13 17:13:53 CET 2011


Author: martin.v.loewis
Date: Sun Mar 13 17:13:53 2011
New Revision: 88770

Log:
Put tempfiles into /var/tmp; delete them at the end.


Modified:
   tracker/instances/python-dev/extensions/create_patch.py

Modified: tracker/instances/python-dev/extensions/create_patch.py
==============================================================================
--- tracker/instances/python-dev/extensions/create_patch.py	(original)
+++ tracker/instances/python-dev/extensions/create_patch.py	Sun Mar 13 17:13:53 2011
@@ -7,7 +7,7 @@
 def download_patch(source, lastrev):
     from mercurial import hg, ui, localrepo, commands, bundlerepo
     UI = ui.ui()
-    bundle = tempfile.mktemp()
+    bundle = tempfile.mktemp(dir="/var/tmp")
     cwd = os.getcwd()
     os.chdir(base)
     try:
@@ -31,6 +31,8 @@
         result = repo.ui.popbuffer()
     finally:
         os.chdir(cwd)
+        if os.path.exists(bundle):
+            os.unlink(bundle)
     return result, rhead
 
 class CreatePatch(Action):


More information about the Python-checkins mailing list