]> git.decadent.org.uk Git - dak.git/blobdiff - fernanda
Python, not C!
[dak.git] / fernanda
index 206633d5ee1d5438ce696948679acee68f6bbd65..466f6197c349bfd7271539154fe3aec0b7407e4c 100755 (executable)
--- a/fernanda
+++ b/fernanda
@@ -2,7 +2,7 @@
 
 # Script to automate some parts of checking NEW packages
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: fernanda,v 1.3 2001-09-27 01:22:51 troup Exp $
+# $Id: fernanda,v 1.5 2001-11-18 19:57:58 rmurray Exp $
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -85,7 +85,7 @@ def check_dsc (dsc_filename):
     files = utils.build_file_list(dsc, 1);
 
     print "---- .dsc file for %s ----" % (dsc_filename);
-    dsc_file = utils.open_file(dsc_filename, 'r');
+    dsc_file = utils.open_file(dsc_filename);
     for line in dsc_file.readlines():
         print line[:-1];
     print;
@@ -124,7 +124,7 @@ def check_changes (changes_filename):
     changes = utils.parse_changes (changes_filename, 0);
 
     print "---- .changes file for %s ----" % (changes_filename);
-    file = utils.open_file (changes_filename, 'r');
+    file = utils.open_file (changes_filename);
     for line in file.readlines():
        print line[:-1]
     print ;
@@ -142,14 +142,12 @@ def check_changes (changes_filename):
 def main ():
     global Cnf, projectB, db_files, waste, excluded;
 
-    apt_pkg.init();
-
-    Cnf = apt_pkg.newConfiguration();
-    apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
+    Cnf = utils.get_conf()
 
     Arguments = [('h',"help","Fernanda::Options::Help")];
     for i in [ "help" ]:
-        Cnf["Fernanda::Options::%s" % (i)] = "";
+       if not Cnf.has_key("Frenanda::Options::%s" % (i)):
+           Cnf["Fernanda::Options::%s" % (i)] = "";
 
     args = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
     Options = Cnf.SubTree("Fernanda::Options")