X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=dc92f74fc5a2065d4d7259b788002f8966c16860;hb=a29878d1b68545cac92669617f94c81330ee4fc7;hp=d0fc9c029bf83a8e6b318f9a3cd4088857260d40;hpb=68be5a147bb14adf6625b8bbf6436a0831deeb32;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index d0fc9c02..dc92f74f 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -1008,23 +1008,23 @@ def check_transition(sourcepkg): # Only check if there is a file defined (and existant) with checks. It's a little bit # specific to Debian, not much use for others, so return early there. - if not Cnf.has_key("Dinstall::Reject::ReleaseTransitions") and - not os.path.exists("%s" % (Cnf["Dinstall::Reject::ReleaseTransitions"])): + if not Cnf.has_key("Dinstall::Reject::ReleaseTransitions") or not os.path.exists("%s" % (Cnf["Dinstall::Reject::ReleaseTransitions"])): return # Parse the yaml file sourcefile = file(Cnf["Dinstall::Reject::ReleaseTransitions"], 'r') + sourcecontent = sourcefile.read() try: - transitions = load(sourcefile) + transitions = load(sourcecontent) except error, msg: # This shouldn't happen, the release team has a wrapper to check the file, but better # safe then sorry - utils.warn("Not checking transitions, the transitions file is broken: %s." % (msg)) + daklib.utils.warn("Not checking transitions, the transitions file is broken: %s." % (msg)) return # Now look through all defined transitions - for trans in transition: - t = transition[trans] + for trans in transitions: + t = transitions[trans] source = t["source"] new_vers = t["new"]