]> git.decadent.org.uk Git - dak.git/blobdiff - dak/override.py
add get_sections and get_priorities
[dak.git] / dak / override.py
index f98f03c5ae21a2f761fa1bd9550949e7e90a4b97..72b0836e57810cfbcff2aeeb3e554d00d13fb265 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Microscopic modification and query tool for overrides in projectb
+""" Microscopic modification and query tool for overrides in projectb """
 # Copyright (C) 2004, 2006  Daniel Silverstone <dsilvers@digital-scurf.org>
 
 # This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,7 @@
 
 import pg, sys
 import apt_pkg
-from daklib import logging
+from daklib import daklog
 from daklib import database
 from daklib import utils
 
@@ -107,9 +107,9 @@ def main ():
 
     # Retrieve current section/priority...
     oldsection, oldsourcesection, oldpriority = None, None, None
-    for type in ['source', 'binary']:
+    for packagetype in ['source', 'binary']:
         eqdsc = '!='
-        if type == 'source':
+        if packagetype == 'source':
             eqdsc = '='
         q = projectB.query("""
     SELECT priority.priority AS prio, section.section AS sect, override_type.type AS type
@@ -129,7 +129,7 @@ def main ():
             utils.fubar("%s is ambiguous. Matches %d packages" % (package,q.ntuples()))
 
         r = q.getresult()
-        if type == 'binary':
+        if packagetype == 'binary':
             oldsection = r[0][1]
             oldpriority = r[0][0]
         else:
@@ -202,7 +202,7 @@ def main ():
 
     game_over()
 
-    Logger = logging.Logger(Cnf, "override")
+    Logger = daklog.Logger(Cnf, "override")
 
     projectB.query("BEGIN WORK")
     # We're in "do it" mode, we have something to do... do it