mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Translate disabled commit to proper disabled
This commit is contained in:
parent
327e472169
commit
945f99e4ca
1 changed files with 13 additions and 1 deletions
|
@ -472,7 +472,19 @@ def parse_metadata(metafile, verbose=False):
|
||||||
testvercode = int(thisbuild['vercode'])
|
testvercode = int(thisbuild['vercode'])
|
||||||
except:
|
except:
|
||||||
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
||||||
thisbuild['commit'] = parts[2]
|
if parts[2].startswith('!'):
|
||||||
|
# For backwards compatibility, handle old-style disabling,
|
||||||
|
# including attempting to extract the commit from the message
|
||||||
|
thisbuild['disabled'] = parts[2]
|
||||||
|
commit = 'unknown - see disabled'
|
||||||
|
index = parts[2].rfind('at ')
|
||||||
|
if index != -1:
|
||||||
|
commit = parts[2][index+3:]
|
||||||
|
if commit.endswith(')'):
|
||||||
|
commit = commit[:-1]
|
||||||
|
thisbuild['commit'] = commit
|
||||||
|
else:
|
||||||
|
thisbuild['commit'] = parts[2]
|
||||||
for p in parts[3:]:
|
for p in parts[3:]:
|
||||||
pk, pv = p.split('=', 1)
|
pk, pv = p.split('=', 1)
|
||||||
thisbuild[pk.strip()] = pv
|
thisbuild[pk.strip()] = pv
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue