Skip to content
Myr

Catch UnsupportedOperation.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent a05aba1 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/models.py+2 added-2 removed
9 unmodified lines
10import collections11import logging12import datetime1314from io import BytesIO14from io import BytesIO, UnsupportedOperation15from .hooks import default_hooks16from .structures import CaseInsensitiveDict1718from .auth import HTTPBasicAuth
365 unmodified lines
384 ])385386 try:387 length = super_len(data)388 except (TypeError, AttributeError):388 except (TypeError, AttributeError, UnsupportedOperation):389 length = None390391 if is_stream:392 body = data
332 unmodified lines