mirror of
https://github.com/Mic92/nix-update.git
synced 2024-11-03 21:04:49 +03:00
fix fetching GitLab snapshots on repos with no tags
This commit fixes #242 Signed-off-by: Federico Damián Schonborn <federicoschonborn@disroot.org>
This commit is contained in:
parent
5a5f48412d
commit
46218bd11e
@ -52,7 +52,10 @@ def fetch_gitlab_snapshots(url: ParseResult, branch: str) -> list[Version]:
|
|||||||
resp = urllib.request.urlopen(gitlab_url)
|
resp = urllib.request.urlopen(gitlab_url)
|
||||||
commits = json.load(resp)
|
commits = json.load(resp)
|
||||||
|
|
||||||
versions = fetch_gitlab_versions(url)
|
try:
|
||||||
|
versions = fetch_gitlab_versions(url)
|
||||||
|
except VersionError:
|
||||||
|
versions = []
|
||||||
latest_version = versions[0].number if versions else "0"
|
latest_version = versions[0].number if versions else "0"
|
||||||
|
|
||||||
for commit in commits:
|
for commit in commits:
|
||||||
|
Loading…
Reference in New Issue
Block a user