Skip to content

Commit

Permalink
Merge pull request #1000 from duk3luk3/ssl-recv-fix
Browse files Browse the repository at this point in the history
Make _ssl_recv always return bytes
  • Loading branch information
embolalia committed Jan 16, 2016
2 parents 9b250d7 + 52fbfab commit b5f30c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sopel/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _ssl_recv(self, buffer_size):
data = self.socket.read(buffer_size)
if not data:
self.handle_close()
return ''
return b''
return data
except ssl.SSLError as why:
if why[0] in (asyncore.ECONNRESET, asyncore.ENOTCONN,
Expand All @@ -285,7 +285,7 @@ def _ssl_recv(self, buffer_size):
return ''
elif why[0] == errno.ENOENT:
# Required in order to keep it non-blocking
return ''
return b''
else:
raise

Expand Down

0 comments on commit b5f30c8

Please sign in to comment.