mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
assert -> ValueError
This commit is contained in:
parent
76040b53f5
commit
24899dae8e
@ -155,7 +155,8 @@ class _FakeTahoeUriHandler(Resource, object):
|
||||
cap = self._generate_capability(kind)
|
||||
if self._data is None:
|
||||
self._data = dict()
|
||||
assert cap not in self._data, "already have '{}'".format(cap)
|
||||
if cap in self._data:
|
||||
raise ValueError("already have '{}'".format(cap))
|
||||
self._data[cap] = data
|
||||
return cap
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user