[dak/master 8/8] knwonchnges
do not import subdirs for now.
Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
dak/dakdb/update18.py | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dak/dakdb/update18.py b/dak/dakdb/update18.py
index 50767d8..3bf1fbf 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)
--
1.6.3.3
Reply to: