[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 03/18] Simplify config path



Signed-off-by: Mark Hymers <mhy@debian.org>
---
 config/backports/dak.conf |    5 +----
 config/debian/dak.conf    |    5 +----
 dak/transitions.py        |   10 +++++-----
 daklib/queue.py           |    2 +-
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/config/backports/dak.conf b/config/backports/dak.conf
index d019f87..8bd498a 100644
--- a/config/backports/dak.conf
+++ b/config/backports/dak.conf
@@ -29,10 +29,7 @@ Dinstall
    CloseBugs "false";
    OverrideDisparityCheck "false";
    DefaultSuite "lenny-backports";
-   Reject
-   {
-     ReleaseTransitions "/srv/backports-master.debian.org/hints/transitions.yaml";
-   };
+   ReleaseTransitions "/srv/backports-master.debian.org/hints/transitions.yaml";
    // If set, only send mails to addresses listed there.
    // format of entries: one entry per line. Either an email address directly, or a regular expression,
    // prefixed by "RE:". Examples: "jane.doe@domain.com" or "RE:jane[^@]@domain.com", where the first will
diff --git a/config/debian/dak.conf b/config/debian/dak.conf
index 39379ec..4242736 100644
--- a/config/debian/dak.conf
+++ b/config/debian/dak.conf
@@ -21,10 +21,7 @@ Dinstall
    OverrideDisparityCheck "true";
    DefaultSuite "unstable";
    LintianTags "/srv/ftp-master.debian.org/dak/config/debian/lintian.tags";
-   Reject
-   {
-     ReleaseTransitions "/srv/ftp.debian.org/web/transitions.yaml";
-   };
+   ReleaseTransitions "/srv/ftp.debian.org/web/transitions.yaml";
    // if you setup an own dak repository and want to upload Debian packages you most possibly want
    // to set the following option to a real path/filename and then enter those mail addresses that
    // you want to be able to receive mails generated by your dak installation. This avoids spamming
diff --git a/dak/transitions.py b/dak/transitions.py
index 157e1c0..e2461ad 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)
@@ -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,13 +568,13 @@ 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("Dir::TempPath", "")
diff --git a/daklib/queue.py b/daklib/queue.py
index c5cd4a6..8d27a31 100755
--- a/daklib/queue.py
+++ b/daklib/queue.py
@@ -1840,7 +1840,7 @@ class Upload(object):
 
         # Also only check if there is a file defined (and existant) with
         # checks.
-        transpath = cnf.get("Dinstall::Reject::ReleaseTransitions", "")
+        transpath = cnf.get("Dinstall::ReleaseTransitions", "")
         if transpath == "" or not os.path.exists(transpath):
             return
 
-- 
1.7.2.5



Reply to: