chiark / gitweb /
lint: check srclibs has name and @ in it
authorHans-Christoph Steiner <hans@eds.org>
Wed, 31 Jan 2018 12:33:06 +0000 (13:33 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 31 Jan 2018 12:33:36 +0000 (13:33 +0100)
fdroiddata!2863

fdroidserver/lint.py

index 0f6252b02a1aae9aabe2fbcace59e95903418f61..315a61b880d6d12417c377f2cce063f4705bd89d 100644 (file)
@@ -369,10 +369,13 @@ def check_builds(app):
                 yield _("Branch '{branch}' used as commit in build '{versionName}'")\
                     .format(branch=s, versionName=build.versionName)
             for srclib in build.srclibs:
-                ref = srclib.split('@')[1].split('/')[0]
-                if ref.startswith(s):
-                    yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
-                        .format(branch=s, srclib=srclib)
+                if '@' in srclib:
+                    ref = srclib.split('@')[1].split('/')[0]
+                    if ref.startswith(s):
+                        yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
+                            .format(branch=s, srclib=srclib)
+                else:
+                    yield _('srclibs missing name and/or @') + ' (srclibs: ' + srclib + ')'
         for key in build.keys():
             if key not in supported_flags:
                 yield _('%s is not an accepted build field') % key