chiark / gitweb /
scanner: don't crash on unused gradle files
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 22 Sep 2015 20:02:26 +0000 (13:02 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 22 Sep 2015 20:02:26 +0000 (13:02 -0700)
fdroidserver/scanner.py

index 9ebfdb17478ac03bdbe9417c8a3c37cf476eff9d..c26438ad1128a7c434d06cf90858bbef9aa4c181 100644 (file)
@@ -33,7 +33,7 @@ options = None
 
 def get_gradle_compile_commands(thisbuild):
     compileCommands = ['compile', 'releaseCompile']
-    if thisbuild['gradle'] != ['yes']:
+    if thisbuild['gradle'] and thisbuild['gradle'] != ['yes']:
         compileCommands += [flavor + 'Compile' for flavor in thisbuild['gradle']]
         compileCommands += [flavor + 'ReleaseCompile' for flavor in thisbuild['gradle']]