Commits

Denis Bilenko committed bf12557

raise TypeError instead of Exception in send()

Comments (0)

Files changed (1)

geventwebsocket/websocket.py

         elif isinstance(message, str):
             message = unicode(message, 'utf-8').encode('utf-8')
         else:
-            raise Exception("Invalid message encoding")
+            raise TypeError("Invalid message encoding")
 
         self.socket.sendall("\x00" + message + "\xFF")