From: Daniel Martí Date: Tue, 26 Aug 2014 11:40:18 +0000 (+0200) Subject: Don't accept empty commits X-Git-Tag: 0.3.0~73 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3d50ecf5fe8d3445f136e603917b3afa3d98efc8;p=fdroidserver.git Don't accept empty commits With SCMs like git, "git checkout ''" doesn't actually fail, so one may commit builds without noticing that they left the commit empty. --- diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index c6a4db0a..7672de68 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -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))