chiark / gitweb /
Don't accept empty commits
[fdroidserver.git] / fdroidserver / metadata.py
index c6a4db0a97ce50a5c87abbe43c68f2ef93c39ea6..7672de68482cd19760ec4c0b39503a2a60430ecc 100644 (file)
@@ -679,7 +679,8 @@ def parse_metadata(metafile):
         line = line.rstrip('\r\n')
         if mode == 3:
             if not any(line.startswith(s) for s in (' ', '\t')):
-                if 'commit' not in curbuild and 'disable' not in curbuild:
+                commit = curbuild['commit'] if 'commit' in curbuild else None
+                if not commit and 'disable' not in curbuild:
                     raise MetaDataException("No commit specified for {0} in {1}"
                                             .format(curbuild['version'], linedesc))