From dc20bf9c858c4c2d720dfe0f097d9f94d0c0a9f1 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 30 Oct 2009 10:23:25 +0100 Subject: [PATCH] knwonchnges do not import subdirs for now. Signed-off-by: Joerg Jaspert --- dak/dakdb/update18.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dak/dakdb/update18.py b/dak/dakdb/update18.py index 50767d88..3bf1fbf8 100755 --- a/dak/dakdb/update18.py +++ b/dak/dakdb/update18.py @@ -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) -- 2.39.5