Raise
This commit is contained in:
parent
e87dee3bdf
commit
83c962166d
@ -131,7 +131,7 @@ class Url():
|
|||||||
try:
|
try:
|
||||||
response = urlopen(req) #nosec
|
response = urlopen(req) #nosec
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
WaybackError(e)
|
raise WaybackError(e)
|
||||||
|
|
||||||
data = json.loads(response.read().decode("UTF-8"))
|
data = json.loads(response.read().decode("UTF-8"))
|
||||||
if not data["archived_snapshots"]:
|
if not data["archived_snapshots"]:
|
||||||
@ -161,6 +161,6 @@ class Url():
|
|||||||
try:
|
try:
|
||||||
response = urlopen(req) #nosec
|
response = urlopen(req) #nosec
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
WaybackError(e)
|
raise WaybackError(e)
|
||||||
|
|
||||||
return str(response.read()).count(",") # Most efficient method to count number of archives (yet)
|
return str(response.read()).count(",") # Most efficient method to count number of archives (yet)
|
||||||
|
Loading…
Reference in New Issue
Block a user