From 5db86215f6a4ebf6bde90ea8b9e6e7beca80747c Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 31 Jan 2018 13:33:06 +0100 Subject: [PATCH] lint: check srclibs has name and @ in it fdroiddata!2863 --- fdroidserver/lint.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 0f6252b0..315a61b8 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -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