From 7c3d738756cc0a1d035974147f2428ab54354b1c Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 30 Jan 2021 23:41:31 +0000 Subject: [PATCH] Fix index out of range error in get_latest_tag --- app/tasks/importtasks.py | 3 +-- app/templates/todo/user.html | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/tasks/importtasks.py b/app/tasks/importtasks.py index 5caac5bf..7948cce0 100644 --- a/app/tasks/importtasks.py +++ b/app/tasks/importtasks.py @@ -113,6 +113,7 @@ def get_latest_tag(git_url): origin.fetch() refs = repo.git.ls_remote(tags=True, sort="creatordate").split('\n') + refs = [ref for ref in refs if ref.strip() != ""] if len(refs) == 0: return None @@ -394,8 +395,6 @@ def check_update_config(self, package_id): err = None try: check_update_config_impl(package) - except IndexError as e: - err = "Unable to find the reference.\n" + str(e) except GitCommandError as e: # This is needed to stop the backtrace being weird err = e.stderr diff --git a/app/templates/todo/user.html b/app/templates/todo/user.html index eaa9747f..70a9e040 100644 --- a/app/templates/todo/user.html +++ b/app/templates/todo/user.html @@ -57,6 +57,9 @@
See All

{{ _("Packages Without Tags") }}

+

+ Labelling your packages with tags helps users find them. +

{% for package in needs_tags %}