From: Daniel Martí Date: Tue, 27 Oct 2015 12:42:02 +0000 (+0100) Subject: checkupdates: better "no tags" messages X-Git-Tag: 0.5.0~17 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2de274326a507b1c05863bd03d1ac5a8e33659f3;p=fdroidserver.git checkupdates: better "no tags" messages --- diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index fdc7157b..a545171f 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -128,10 +128,15 @@ def check_tags(app, pattern): hcode = "0" tags = vcs.gettags() + if not tags: + return (None, "No tags found", None) + logging.debug("All tags: " + ','.join(tags)) if pattern: pat = re.compile(pattern) tags = [tag for tag in tags if pat.match(tag)] + if not tags: + return (None, "No matching tags found", None) logging.debug("Matching tags: " + ','.join(tags)) if len(tags) > 5 and repotype in ('git',):