X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_new.py;h=e3dc5de13e735a35b479335a60841cf18256db97;hb=1dd3d2fb2df2af57cf3966e257a94e000235407a;hp=7352b91d16d7efb6332d60870eccea679903cdb6;hpb=63984f2fb55d3dd16ed5ff3b3257448d1b5b225b;p=dak.git diff --git a/dak/process_new.py b/dak/process_new.py index 7352b91d..e3dc5de1 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -527,17 +527,12 @@ def do_new(upload, upload_copy, handler, session): continue if answer == 'A' and not Options["Trainee"]: - try: - check_daily_lock() - add_overrides(missing, upload.target_suite, session) - if Config().find_b("Dinstall::BXANotify"): - do_bxa_notification(missing, upload, session) - handler.accept() - done = True - Logger.log(["NEW ACCEPT", upload.changes.changesname]) - except CantGetLockError: - print "Hello? Operator! Give me the number for 911!" - print "Dinstall in the locked area, cant process packages, come back later" + add_overrides(missing, upload.target_suite, session) + if Config().find_b("Dinstall::BXANotify"): + do_bxa_notification(missing, upload, session) + handler.accept() + done = True + Logger.log(["NEW ACCEPT", upload.changes.changesname]) elif answer == 'C': check_pkg(upload, upload_copy, session) elif answer == 'E' and not Options["Trainee"]: @@ -625,24 +620,6 @@ ENVIRONMENT VARIABLES ################################################################################ -def check_daily_lock(): - """ - Raises CantGetLockError if the dinstall daily.lock exists. - """ - - cnf = Config() - try: - lockfile = cnf.get("Process-New::DinstallLockFile", - os.path.join(cnf['Dir::Lock'], 'processnew.lock')) - - os.open(lockfile, - os.O_RDONLY | os.O_CREAT | os.O_EXCL) - except OSError as e: - if e.errno == errno.EEXIST or e.errno == errno.EACCES: - raise CantGetLockError - - os.unlink(lockfile) - @contextlib.contextmanager def lock_package(package): """