chiark / gitweb /
build: don't error on .fdroid* files in fdroiddata
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 23 Feb 2016 12:03:26 +0000 (12:03 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 23 Feb 2016 12:03:26 +0000 (12:03 +0000)
This avoids the following incorrect error:

fdroidserver.common.FDroidException: Only one local metadata file allowed! Found: .fdroid.keystorepass.txt .fdroid.keypass.txt

fdroidserver/build.py

index 2add23a745237a01a88baad0e3f13efcb061f4ee..216de06f7e28480bff220f95b5681e293304b42d 100644 (file)
@@ -1009,13 +1009,14 @@ def main():
     options, parser = parse_commandline()
 
     metadata_files = glob.glob('.fdroid.*[a-z]')  # ignore files ending in ~
-    if len(metadata_files) > 1:
+    if os.path.isdir('metadata'):
+        pass
+    elif len(metadata_files) == 0:
+        raise FDroidException("No app metadata found, nothing to process!")
+    elif len(metadata_files) > 1:
         raise FDroidException("Only one local metadata file allowed! Found: "
                               + " ".join(metadata_files))
 
-    if not os.path.isdir('metadata') and len(metadata_files) == 0:
-        raise FDroidException("No app metadata found, nothing to process!")
-
     if not options.appid and not options.all:
         parser.error("option %s: If you really want to build all the apps, use --all" % "all")