]> git.decadent.org.uk Git - dak.git/commitdiff
knwonchnges
authorJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:23:25 +0000 (10:23 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:23:25 +0000 (10:23 +0100)
do not import subdirs for now.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/dakdb/update18.py

index 50767d888d02ceb64501360321b91af50cf2e8d5..3bf1fbf8723cf9922460e8638c81f7c5ad3809c1 100755 (executable)
@@ -125,20 +125,16 @@ def do_update(self):
             checkdir = cnf["Dir::Queue::%s" % (directory) ]
             if os.path.exists(checkdir):
                 print "Looking into %s" % (checkdir)
-                for dirpath, dirnames, filenames in os.walk(checkdir, topdown=False):
-                    if not filenames:
-                        # Empty directory (or only subdirectories), next
-                        continue
-                    for changesfile in filenames:
-                        if not changesfile.endswith(".changes"):
+                for filename in os.listdir(checkdir):
+                    if not filename.endswith(".changes"):
                             # Only interested in changes files.
                             continue
                         try:
                             count += 1
-                            print "Directory %s, file %7d, failures %3d. (%s)" % (dirpath[-10:], count, failure, changesfile)
+                            print "Directory %s, file %7d, failures %3d. (%s)" % (directory, count, failure, filename)
                             changes = Changes()
-                            changes.changes_file = changesfile
-                            changesfile = os.path.join(dirpath, changesfile)
+                            changes.changes_file = filename
+                            changesfile = os.path.join(checkdir, filename)
                             changes.changes = parse_changes(changesfile, signing_rules=-1)
                             changes.changes["fingerprint"], = check_signature(changesfile)
                             changes.add_known_changes(directory)