From db8cffbca831c34cc14ebcddf0124940417bdbac Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 21 Mar 2008 16:49:06 +0100 Subject: [PATCH] import errno, create tempfile *after* we got the lockfile --- dak/edit_transitions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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") -- 2.39.5