mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
assert -> Exception
This commit is contained in:
parent
a9f4210014
commit
80359e02e6
@ -162,7 +162,10 @@ class _FakeTahoeUriHandler(Resource, object):
|
||||
return (False, k)
|
||||
|
||||
cap = self._generate_capability(kind)
|
||||
assert cap not in self.data, "logic error" # shouldn't happen
|
||||
# it should be impossible for this to already be in our data,
|
||||
# but check anyway to be sure
|
||||
if cap in self.data:
|
||||
raise Exception("Internal error; key already exists somehow")
|
||||
self.data[cap] = data
|
||||
return (True, cap)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user