From: Johannes Berg Date: Sun, 31 Mar 2013 21:15:25 +0000 (+0200) Subject: apply patches correctly X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=771fdc05ca3597a22a52498d6fa794fecbd7b348;p=openwrt%2Fstaging%2Fblogic.git apply patches correctly Not all patch dirs hold an INFO file, so don't require it. Signed-off-by: Johannes Berg --- 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)