X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Ftransitions.py;h=e2461ad2ef56b82ee0cb19bc7fdb7e14f106dcce;hb=e9db98a6b9c072bfd2cbcf34777219b8364f3a02;hp=2bd32381afc1b010caff11babb2af57c0644bed5;hpb=94728eaa0bfe92f0eb50528a513fafdb2540d831;p=dak.git diff --git a/dak/transitions.py b/dak/transitions.py index 2bd32381..e2461ad2 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -255,7 +255,7 @@ def write_transitions(from_trans): """ - trans_file = Cnf["Dinstall::Reject::ReleaseTransitions"] + trans_file = Cnf["Dinstall::ReleaseTransitions"] trans_temp = trans_file + ".tmp" trans_lock = lock_file(trans_file) @@ -287,8 +287,8 @@ def write_transitions_from_file(from_file): """ # Lets check if from_file is in the directory we expect it to be in - if not os.path.abspath(from_file).startswith(Cnf["TempPath::TempPath"]): - print "Will not accept transitions file outside of %s" % (Cnf["TempPath::TempPath"]) + if not os.path.abspath(from_file).startswith(Cnf["Dir::TempPath"]): + print "Will not accept transitions file outside of %s" % (Cnf["Dir::TempPath"]) sys.exit(3) if Options["sudo"]: @@ -318,7 +318,7 @@ def temp_transitions_file(transitions): sudo-ed script and would be unreadable if it has default mkstemp mode """ - (fd, path) = tempfile.mkstemp("", "transitions", Cnf["TempPath::TempPath"]) + (fd, path) = tempfile.mkstemp("", "transitions", Cnf["Dir::TempPath"]) os.chmod(path, 0644) f = open(path, "w") yaml.dump(transitions, f, default_flow_style=False) @@ -328,7 +328,7 @@ def temp_transitions_file(transitions): def edit_transitions(): """ Edit the defined transitions. """ - trans_file = Cnf["Dinstall::Reject::ReleaseTransitions"] + trans_file = Cnf["Dinstall::ReleaseTransitions"] edit_file = temp_transitions_file(load_transitions(trans_file)) editor = os.environ.get("EDITOR", "vi") @@ -568,22 +568,22 @@ def main(): init() # Check if there is a file defined (and existant) - transpath = Cnf.get("Dinstall::Reject::ReleaseTransitions", "") + transpath = Cnf.get("Dinstall::ReleaseTransitions", "") if transpath == "": - utils.warn("Dinstall::Reject::ReleaseTransitions not defined") + utils.warn("Dinstall::ReleaseTransitions not defined") sys.exit(1) if not os.path.exists(transpath): utils.warn("ReleaseTransitions file, %s, not found." % - (Cnf["Dinstall::Reject::ReleaseTransitions"])) + (Cnf["Dinstall::ReleaseTransitions"])) sys.exit(1) # Also check if our temp directory is defined and existant - temppath = Cnf.get("TempPath::TempPath", "") + temppath = Cnf.get("Dir::TempPath", "") if temppath == "": - utils.warn("TempPath::TempPath not defined") + utils.warn("Dir::TempPath not defined") sys.exit(1) if not os.path.exists(temppath): utils.warn("Temporary path %s not found." % - (Cnf["TempPath::TempPath"])) + (Cnf["Dir::TempPath"])) sys.exit(1) if Options["import"]: