assert -> ValueError
This commit is contained in:
parent
bd858f8fef
commit
66f61c514b
|
@ -155,7 +155,8 @@ class _FakeTahoeUriHandler(Resource, object):
|
||||||
cap = self._generate_capability(kind)
|
cap = self._generate_capability(kind)
|
||||||
if self._data is None:
|
if self._data is None:
|
||||||
self._data = dict()
|
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
|
self._data[cap] = data
|
||||||
return cap
|
return cap
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue