From 771fdc05ca3597a22a52498d6fa794fecbd7b348 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sun, 31 Mar 2013 23:15:25 +0200 Subject: [PATCH] apply patches correctly Not all patch dirs hold an INFO file, so don't require it. Signed-off-by: Johannes Berg --- gentree.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gentree.py b/gentree.py index 06aee47df238..492631049b89 100755 --- a/gentree.py +++ b/gentree.py @@ -186,12 +186,15 @@ def main(): patchdirs = [] for root, dirs, files in os.walk(os.path.join(source_dir, 'patches')): - if 'INFO' in files: - patchdirs.append(root) + for f in files: + if f.endswith('.patch'): + patchdirs.append(root) + break patchdirs.sort() for pdir in patchdirs: l = os.listdir(pdir) - l.remove('INFO') + if 'INFO' in l: + l.remove('INFO') printed = False for pfile in l: pfile = os.path.join(pdir, pfile) -- 2.30.2