From 2193d5c962d3a05fa81ca7285ef1463d2d471ba5 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Fri, 8 Jan 2010 07:45:26 -0800 Subject: [PATCH] added filesocket.py for 2.6 compatibility --- sleekxmpp/xmlstream/filesocket.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sleekxmpp/xmlstream/filesocket.py diff --git a/sleekxmpp/xmlstream/filesocket.py b/sleekxmpp/xmlstream/filesocket.py new file mode 100644 index 0000000..92d61e6 --- /dev/null +++ b/sleekxmpp/xmlstream/filesocket.py @@ -0,0 +1,8 @@ +from socket import _fileobject + +class filesocket(_fileobject): + + def read(self, size=-1): + data = self._sock.recv(size) + if data is not None: + return data