[Python-checkins] r59819 - in python/trunk: Doc/library/socket.rst Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c Modules/socketmodule.h configure configure.in pyconfig.h.in

Georg Brandl g.brandl at gmx.net
Mon Jan 7 18:01:05 CET 2008


christian.heimes schrieb:
> Author: christian.heimes
> Date: Mon Jan 7 17:12:44 2008
> New Revision: 59819
>> Modified:
> python/trunk/Doc/library/socket.rst
> python/trunk/Lib/test/test_socket.py
> python/trunk/Misc/NEWS
> python/trunk/Modules/socketmodule.c
> python/trunk/Modules/socketmodule.h
> python/trunk/configure
> python/trunk/configure.in
> python/trunk/pyconfig.h.in
> Log:
> Issue #1646: Make socket support TIPC. The socket module now has support
> for TIPC under Linux, see http://tipc.sf.net/ for more information.
> Thanks to Alberto Bertogli for the patch

> Modified: python/trunk/Lib/test/test_socket.py
> ==============================================================================
> --- python/trunk/Lib/test/test_socket.py	(original)
> +++ python/trunk/Lib/test/test_socket.py	Mon Jan 7 17:12:44 2008
> @@ -1084,6 +1084,85 @@
> buf = buffer(MSG)
> self.serv_conn.send(buf)
>> +
> +TIPC_STYPE = 2000
> +TIPC_LOWER = 200
> +TIPC_UPPER = 210
> +
> +def isTipcAvailable():
> + """Check if the TIPC module is loaded
> +
> + The TIPC module is not loaded automatically on Ubuntu and probably
> + other Linux distros.
> + """
> + if not hasattr(socket, "AF_TIPC"):
> + return False
> + if not os.path.isfile("/proc/modules"):
> + return False
> + with open("/proc/modules") as f:
> + for line in f:
> + if line.startswith("tipc "):
> + return True
> + if test_support.debug:

I assume this should be test_support.verbose?
Georg


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /