]> git.decadent.org.uk Git - dak.git/commitdiff
import errno, create tempfile *after* we got the lockfile
authorJoerg Jaspert <joerg@debian.org>
Fri, 21 Mar 2008 15:49:06 +0000 (16:49 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 21 Mar 2008 15:49:06 +0000 (16:49 +0100)
dak/edit_transitions.py

index 1b8376ab455924d496181fd7d47c0cb8d361d118..e283a46a3499153a86c9491a95f284b26811cdd4 100755 (executable)
@@ -24,7 +24,7 @@
 
 ################################################################################
 
-import os, pg, sys, time
+import os, pg, sys, time, errno
 import apt_pkg
 import daklib.database
 import daklib.utils
@@ -102,11 +102,11 @@ def lock_file(lockfile):
 def edit_transitions():
     trans_file = Cnf["Dinstall::Reject::ReleaseTransitions"]
 
-    tempfile = "./%s.transition.tmp" % (os.getpid() )
-
     lockfile="/tmp/transitions.lock"
     lock_file(lockfile)
 
+    tempfile = "./%s.transition.tmp" % (os.getpid() )
+
     daklib.utils.copy(trans_file, tempfile)
 
     editor = os.environ.get("EDITOR", "vi")