chiark / gitweb /
lint: fix update check data https check
authorMarcus Hoffmann <bubu@bubu1.eu>
Fri, 2 Mar 2018 22:56:49 +0000 (23:56 +0100)
committerMarcus Hoffmann <bubu@bubu1.eu>
Fri, 2 Mar 2018 22:56:49 +0000 (23:56 +0100)
The urlver field can be '.', this was not considered in
26bfd7fb28163abbf8f599609ce57e2bd10a9eed.

fdroidserver/lint.py

index 13779747d763a1b687637ff108a0997b4065e9f8..ed86e29ad32473e5ffc48a76689f6576a6d5afc1 100644 (file)
@@ -214,11 +214,12 @@ def check_update_check_data_url(app):
     if app.UpdateCheckData:
         urlcode, codeex, urlver, verex = app.UpdateCheckData.split('|')
         for url in (urlcode, urlver):
-            parsed = urllib.parse.urlparse(url)
-            if not parsed.scheme or not parsed.netloc:
-                yield _('UpdateCheckData not a valid URL: {url}').format(url=url)
-            if parsed.scheme != 'https':
-                yield _('UpdateCheckData must use HTTPS URL: {url}').format(url=url)
+            if url != '.':
+                parsed = urllib.parse.urlparse(url)
+                if not parsed.scheme or not parsed.netloc:
+                    yield _('UpdateCheckData not a valid URL: {url}').format(url=url)
+                if parsed.scheme != 'https':
+                    yield _('UpdateCheckData must use HTTPS URL: {url}').format(url=url)
 
 
 def check_ucm_tags(app):