Skip to content

Commit

Permalink
Merge pull request #238 from hynek/redundant-type-check
Browse files Browse the repository at this point in the history
Remove redundant check for bytes
  • Loading branch information
alex committed Apr 18, 2015
2 parents 0145533 + c3717b9 commit 9a2c732
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,9 +1415,6 @@ def bio_write(self, buf):
if self._into_ssl is None:
raise TypeError("Connection sock was not None")

if not isinstance(buf, bytes):
raise TypeError("buf must be a byte string")

result = _lib.BIO_write(self._into_ssl, buf, len(buf))
if result <= 0:
self._handle_bio_errors(self._into_ssl, result)
Expand Down Expand Up @@ -1898,6 +1895,7 @@ def get_next_proto_negotiated(self):

return _ffi.buffer(data[0], data_len[0])[:]


@_requires_alpn
def set_alpn_protos(self, protos):
"""
Expand Down

0 comments on commit 9a2c732

Please sign in to comment.