mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-03-09 12:57:39 +00:00
fix: handle HTTPError specifically
This commit is contained in:
parent
cc9001ad88
commit
d4be5189fe
@ -4,6 +4,7 @@
|
||||
from nvchecker.api import (
|
||||
GetVersionError
|
||||
)
|
||||
from nvchecker.httpclient.base import HTTPError
|
||||
|
||||
URL="https://api.snapcraft.io/v2/snaps/info/%(snap)s"
|
||||
|
||||
@ -22,7 +23,7 @@ async def get_version(
|
||||
"Snap-Device-Series": "16",
|
||||
},
|
||||
)
|
||||
except:
|
||||
except HTTPError:
|
||||
raise GetVersionError(f"Failed to request snap info for {snap}")
|
||||
|
||||
for c in result['channel-map']:
|
||||
|
Loading…
Reference in New Issue
Block a user