fail gracefully on invalid URLs

This commit is contained in:
meejah 2019-08-10 12:09:15 -06:00
parent a307adb7f5
commit ec70fa7090

View File

@ -1089,7 +1089,12 @@ class Status(MultiFormatPage):
def childFactory(self, ctx, name):
h = self.history
stype,count_s = name.split("-")
try:
stype, count_s = name.split("-")
except ValueError:
raise RuntimeError(
"no - in '{}'".format(name)
)
count = int(count_s)
if stype == "up":
for s in itertools.chain(h.list_all_upload_statuses(),