assert -> raise

This commit is contained in:
meejah 2020-06-13 00:39:57 -06:00 committed by Sajith Sasidharan
parent 835341f2c2
commit bd858f8fef

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: