assert -> raise

This commit is contained in:
meejah 2020-06-13 00:39:57 -06:00
parent 9f6fcde2f1
commit 76040b53f5

View File

@ -149,7 +149,8 @@ class _FakeTahoeUriHandler(Resource, object):
:returns: a capability-string
"""
assert isinstance(data, bytes)
if not isinstance(data, bytes):
raise TypeError("'data' must be bytes")
cap = self._generate_capability(kind)
if self._data is None: