chiark / gitweb /
non-APK files will not have minSdkVersion, so don't force it
authorHans-Christoph Steiner <hans@eds.org>
Thu, 8 Dec 2016 18:30:38 +0000 (19:30 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 6 Mar 2017 21:03:20 +0000 (22:03 +0100)
fdroidclient should handle no minSdkVersion fine, since it just parses the
text in <sdkver></sdkver> as an int, and uses a default value if there is
an Exception.

fdroidserver/update.py

index a81eda215bcbefe42496e6a86147b47fa07c6cfb..a0324aac7fbc62f259293491038127630845f5eb 100644 (file)
@@ -1217,7 +1217,8 @@ def make_index(apps, sortedids, apks, repodir, archive):
                 hashel.appendChild(doc.createTextNode(apk[hash_type]))
                 apkel.appendChild(hashel)
             addElement('size', str(apk['size']), doc, apkel)
-            addElement('sdkver', str(apk['minSdkVersion']), doc, apkel)
+            addElementIfInApk('sdkver', apk,
+                              'minSdkVersion', doc, apkel)
             addElementIfInApk('targetSdkVersion', apk,
                               'targetSdkVersion', doc, apkel)
             addElementIfInApk('maxsdkver', apk,