From 497c1d804a4203a7c06998804b25fe1c56553b45 Mon Sep 17 00:00:00 2001 From: cliechti Date: Thu, 31 Jul 2014 22:13:19 +0000 Subject: [FTR pyserial:37] Support fileno() function in the socket protocol git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@496 f19166aa-fa4f-0410-85c2-fa1106f25c8a --- CHANGES.txt | 1 + serial/urlhandler/protocol_socket.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index da3f6df..2433647 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -478,6 +478,7 @@ Bugfixes (win32): Version 2.8 2014-xx-xx --------------------------- +- [FTR pyserial:37] Support fileno() function in the socket protocol Bugfixes: diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py index c90a8e4..09a23d0 100644 --- a/serial/urlhandler/protocol_socket.py +++ b/serial/urlhandler/protocol_socket.py @@ -242,7 +242,11 @@ class SocketSerial(SerialBase): return True # - - - platform specific - - - - # None so far + + # works on Linux and probably all the other POSIX systems + def fileno(self): + """Get the file handle of the underlying socket for use with select""" + return self._socket.fileno() # assemble Serial class with the platform specific implementation and the base -- cgit v1.2.1