chiark / gitweb /
checkupdates: Avoid variable/string names as CV
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 12 Sep 2015 06:17:46 +0000 (23:17 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 12 Sep 2015 06:17:46 +0000 (23:17 -0700)
fdroidserver/checkupdates.py

index f06e35a749173357ff5f7142bc865b1b6eb798e1..786484103c1f39cc3db2fd060f985b03d2afe3ed 100644 (file)
@@ -433,6 +433,12 @@ def checkupdates_app(app, first=True):
         vercode = str(eval(op))
         logging.debug("Applied vercode operation: %s -> %s" % (oldvercode, vercode))
 
+    if version and any(version.startswith(s) for s in [
+            '${',  # Gradle variable names
+            '@string/',  # Strings we could not resolve
+            ]):
+        version = "Unknown"
+
     updating = False
     if version is None:
         logmsg = "...{0} : {1}".format(app['id'], msg)