[Python-checkins] r80115 - python/branches/py3k/Lib/test/test_os.py
mark.dickinson
python-checkins at python.org
Fri Apr 16 15:51:27 CEST 2010
Author: mark.dickinson
Date: Fri Apr 16 15:51:27 2010
New Revision: 80115
Log:
Don't assume that os.confstr_names exists.
Modified:
python/branches/py3k/Lib/test/test_os.py
Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py (original)
+++ python/branches/py3k/Lib/test/test_os.py Fri Apr 16 15:51:27 2010
@@ -17,7 +17,8 @@
# and unmaintained) linuxthreads threading library. There's an issue
# when combining linuxthreads with a failed execv call: see
# http://bugs.python.org/issue4970.
-if "CS_GNU_LIBPTHREAD_VERSION" in os.confstr_names:
+if (hasattr(os, "confstr_names") and
+ "CS_GNU_LIBPTHREAD_VERSION" in os.confstr_names):
libpthread = os.confstr("CS_GNU_LIBPTHREAD_VERSION")
USING_LINUXTHREADS= libpthread.startswith("linuxthreads")
else:
More information about the Python-checkins
mailing list