From: Joerg Jaspert Date: Fri, 21 Mar 2008 15:49:06 +0000 (+0100) Subject: import errno, create tempfile *after* we got the lockfile X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=db8cffbca831c34cc14ebcddf0124940417bdbac;p=dak.git import errno, create tempfile *after* we got the lockfile --- diff --git a/dak/edit_transitions.py b/dak/edit_transitions.py index 1b8376ab..e283a46a 100755 --- a/dak/edit_transitions.py +++ b/dak/edit_transitions.py @@ -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")