]> git.donarmstrong.com Git - dak.git/commitdiff
pyflakes cleanups
authorJames Troup <james@nocrew.org>
Mon, 15 May 2006 17:10:39 +0000 (13:10 -0400)
committerJames Troup <james@nocrew.org>
Mon, 15 May 2006 17:10:39 +0000 (13:10 -0400)
dak/ChangeLog
dak/import_ldap_fingerprints.py
dak/mirror_split.py
dak/queue_report.py

index bc2c4b24a4ca0423eecdfd94b4a3cf33acd65dbd..2c1bff457df8c04839d36152858fe4837e9777b1 100644 (file)
@@ -1,3 +1,14 @@
+2006-05-15  James Troup  <james@nocrew.org>
+
+       * queue_report.py: remove unused encodings imports.
+
+       * mirror_split.py: drop unused pg, pwd, db_access and logging
+       imports.  Initalize 'Cnf' as a global.
+       (BillieDB._internal_recurse): fix 'util.' typo.
+
+       * import_ldap_fingerprints.py (main): drop unused time import and
+       commented out time check for LDAP search.
+
 2005-12-16  Ryan Murray  <rmurray@debian.org>
 
        * halle: add support for udebs
index 504f597b2edd54194d7fde98283a9b87b2e076e9..4fa6d6653a3e86b550ba2922081c71c3e3590295 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 # Sync fingerprint and uid tables with a debian.org LDAP DB
-# Copyright (C) 2003, 2004  James Troup <james@nocrew.org>
+# Copyright (C) 2003, 2004, 2006  James Troup <james@nocrew.org>
 # $Id: emilie,v 1.3 2004-11-27 13:25:35 troup Exp $
 
 # This program is free software; you can redistribute it and/or modify
@@ -45,7 +45,7 @@
 
 ################################################################################
 
-import commands, ldap, pg, re, sys, time
+import commands, ldap, pg, re, sys
 import apt_pkg
 import db_access, utils
 
@@ -94,8 +94,6 @@ def main():
     projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
     db_access.init(Cnf, projectB)
 
-    #before = time.time()
-    #sys.stderr.write("[Getting info from the LDAP server...")
     LDAPDn = Cnf["Emilie::LDAPDn"]
     LDAPServer = Cnf["Emilie::LDAPServer"]
     l = ldap.open(LDAPServer)
@@ -103,7 +101,6 @@ def main():
     Attrs = l.search_s(LDAPDn, ldap.SCOPE_ONELEVEL,
                        "(&(keyfingerprint=*)(gidnumber=%s))" % (Cnf["Julia::ValidGID"]),
                        ["uid", "keyfingerprint"])
-    #sys.stderr.write("done. (%d seconds)]\n" % (int(time.time()-before)))
 
 
     projectB.query("BEGIN WORK")
index b2632b9e2916434064e74028b2b422803c220cbf..efe930d3e471d1f9edfb6a25e9657b424c6aa098 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 # Prepare and maintain partial trees by architecture
-# Copyright (C) 2004  Daniel Silverstone <dsilvers@digital-scurf.org>
+# Copyright (C) 2004, 2006  Daniel Silverstone <dsilvers@digital-scurf.org>
 # $Id: billie,v 1.4 2004-11-27 16:06:42 troup Exp $
 
 # This program is free software; you can redistribute it and/or modify
@@ -24,9 +24,9 @@
 ## <tbm> Make something damned stupid up and attribute it to me, that's okay
 ###############################################################################
 
-import pg, pwd, sys
-import utils, db_access
-import apt_pkg, logging
+import sys
+import utils
+import apt_pkg
 
 from stat import S_ISDIR, S_ISLNK, S_ISREG
 import os
@@ -40,6 +40,8 @@ TREE_ROOT = "***Configure Billie::TreeRootPath Please***"
 TREE_DB_ROOT = "***Configure Billie::TreeDatabasePath Please***"
 trees = []
 
+Cnf = None
+
 ###############################################################################
 # A BillieTarget is a representation of a target. It is a set of archs, a path
 # and whether or not the target includes source.
@@ -165,7 +167,7 @@ class BillieDB:
             elif S_ISREG(lnl[0]):
                 bdir.files[ln] = lnl[1]
             else:
-                util.fubar( "Confused by %s/%s -- not a dir, link or file" %
+                utils.fubar( "Confused by %s/%s -- not a dir, link or file" %
                             ( path, ln ) )
         for d in dirs:
             bdir.dirs[d] = self._internal_recurse( "%s/%s" % (path,d) )
index d2630447e4378e13e7157e7e003dcfe5de7749ee..ce8afca9b38aa6baf0e1a4056514c4aaa3236563 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 # Produces a report on NEW and BYHAND packages
-# Copyright (C) 2001, 2002, 2003, 2005  James Troup <james@nocrew.org>
+# Copyright (C) 2001, 2002, 2003, 2005, 2006  James Troup <james@nocrew.org>
 # $Id: helena,v 1.6 2005-11-15 09:50:32 ajt Exp $
 
 # This program is free software; you can redistribute it and/or modify
@@ -38,7 +38,6 @@
 import copy, glob, os, stat, sys, time
 import apt_pkg
 import katie, utils
-import encodings.utf_8, encodings.latin_1, string
 
 Cnf = None
 Katie = None