Martin Thorsen Ranang  committed 06128e8

Make Incoming.processFrame() more robust, adding explicit data encoding to avoid "exceptions.TypeError: Data must not be unicode" error.

  • Participants
  • Parent commits 9dd54c9
  • Branches 0.8

Comments (0)

Files changed (1)

File daemon/orbited/

         self.logger.debug('processFrame: %s %s %s'%(socketId, frameType, data))
         if frameType == FRAME_CLOSE:
             return self.closeStream(socketId, 'UserConnectionReset')
-        if frameType == FRAME_DATA:        
-            return self.sockets[socketId].transport.write(data)
+        if frameType == FRAME_DATA:
+            return self.sockets[socketId].transport.write(data.encode("ascii"))
         return self.closeStream(socketId, 'ProtocolError')
     def dataReceived(self, rawdata=""):