mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 00:38:11 -05:00
thing: Catch KeyErrors in _by_fullname.
A key error will happen if the thing type is invalid.
This commit is contained in:
@@ -485,7 +485,7 @@ class DataThing(object):
|
||||
thing_id = int(thing_id, 36)
|
||||
lookup[fullname] = (real_type, thing_id)
|
||||
table.setdefault(real_type, []).append(thing_id)
|
||||
except ValueError:
|
||||
except (KeyError, ValueError):
|
||||
if single:
|
||||
raise NotFound
|
||||
|
||||
|
||||
Reference in New Issue
Block a user