chiark / gitweb /
Allow for spaces before/after version and vercode
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 27 Oct 2013 21:32:59 +0000 (22:32 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Sun, 27 Oct 2013 21:32:59 +0000 (22:32 +0100)
This allows for 'Build: foo, 1' as well as the old 'Build:foo,1'

fdroidserver/common.py

index c5ef55c0263aff531a91264c9844afd738f90b5a..51fcfa62ab87d1654459b9a10cd1848b7a233566 100644 (file)
@@ -466,8 +466,8 @@ def parse_metadata(metafile, verbose=False):
             raise MetaDataException("Invalid build format: " + value + " in " + metafile.name)
         thisbuild = {}
         thisbuild['origlines'] = lines
-        thisbuild['version'] = parts[0]
-        thisbuild['vercode'] = parts[1]
+        thisbuild['version'] = parts[0].strip()
+        thisbuild['vercode'] = parts[1].strip()
         try:
             testvercode = int(thisbuild['vercode'])
         except: