apply patches correctly
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 31 Mar 2013 21:15:25 +0000 (23:15 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Sun, 31 Mar 2013 21:15:25 +0000 (23:15 +0200)
Not all patch dirs hold an INFO file, so don't require it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
gentree.py

index 06aee47df238240939bdaad251fedc8653605180..492631049b8946d3cffbf3cc4fa98475439c80de 100755 (executable)
@@ -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)