提交 dc20bf9c 编写于 作者: J Joerg Jaspert

knwonchnges

do not import subdirs for now.
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 555e8102
...@@ -125,20 +125,16 @@ def do_update(self): ...@@ -125,20 +125,16 @@ def do_update(self):
checkdir = cnf["Dir::Queue::%s" % (directory) ] checkdir = cnf["Dir::Queue::%s" % (directory) ]
if os.path.exists(checkdir): if os.path.exists(checkdir):
print "Looking into %s" % (checkdir) print "Looking into %s" % (checkdir)
for dirpath, dirnames, filenames in os.walk(checkdir, topdown=False): for filename in os.listdir(checkdir):
if not filenames: if not filename.endswith(".changes"):
# Empty directory (or only subdirectories), next
continue
for changesfile in filenames:
if not changesfile.endswith(".changes"):
# Only interested in changes files. # Only interested in changes files.
continue continue
try: try:
count += 1 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()
changes.changes_file = changesfile changes.changes_file = filename
changesfile = os.path.join(dirpath, changesfile) changesfile = os.path.join(checkdir, filename)
changes.changes = parse_changes(changesfile, signing_rules=-1) changes.changes = parse_changes(changesfile, signing_rules=-1)
changes.changes["fingerprint"], = check_signature(changesfile) changes.changes["fingerprint"], = check_signature(changesfile)
changes.add_known_changes(directory) changes.add_known_changes(directory)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册