mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
Switch to TypeError.
This commit is contained in:
parent
fae9556e3d
commit
7de3d93b0e
@ -123,7 +123,11 @@ class StorageClient(object):
|
||||
# If there's a request message, serialize it and set the Content-Type
|
||||
# header:
|
||||
if message_to_serialize is not None:
|
||||
assert "data" not in kwargs
|
||||
if "data" in kwargs:
|
||||
raise TypeError(
|
||||
"Can't use both `message_to_serialize` and `data` "
|
||||
"as keyword arguments at the same time"
|
||||
)
|
||||
kwargs["data"] = dumps(message_to_serialize)
|
||||
headers.addRawHeader("Content-Type", CBOR_MIME_TYPE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user