Skip to content

Commit

Permalink
fix python 3.5 build
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 3, 2015
1 parent 0193b5c commit bba8f4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engineio/packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def encode(self, b64=False, always_bytes=True):
def decode(self, encoded_packet):
"""Decode a transmitted package."""
b64 = False
if not isinstance(encoded_packet, six.binary_type):
encoded_packet = encoded_packet.encode('utf-8')
self.packet_type = six.byte2int(encoded_packet[0:1])
if self.packet_type == 98: # 'b' --> binary base64 encoded packet
self.binary = True
Expand Down

0 comments on commit bba8f4b

Please sign in to comment.