Commit 8751eb07 authored by Seblu's avatar Seblu
Browse files

Display message when AUR packages not exists

Instead of an int vs str error
parent 76ea0f0b
......@@ -192,6 +192,8 @@ class VersionController(object):
d = json.loads(url_fd.read().decode("utf-8"))
if "version" not in d or d["version"] != 1:
raise VersionNotFound("Unsupported AUR version")
if len(d["results"]) == 0:
raise VersionNotFound("No such package")
v = d["results"]["Version"].rsplit("-")[0]
logging.debug("AUR version is : %s" % v)
return v
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment