]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't assume that os.confstr_names exists.
authorMark Dickinson <dickinsm@gmail.com>
Fri, 16 Apr 2010 13:51:27 +0000 (13:51 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 16 Apr 2010 13:51:27 +0000 (13:51 +0000)
Lib/test/test_os.py

index fe2a228f6b937e5a49e00381ef6d72aa18245348..557f04d9bf00ed80182b55a1130c7129c2bf6adf 100644 (file)
@@ -17,7 +17,8 @@ from test import support
 # 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: