summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-04-16 13:51:27 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-04-16 13:51:27 (GMT)
commit89589c90fccf3f34639a83ed549778735df64748 (patch)
tree470e0452e6c71b33e046d0b78b3b0ef6ae88fd10 /Lib/test/test_os.py
parent7cf0389138431b8ae442e3c1ed97212a18ada087 (diff)
downloadcpython-89589c90fccf3f34639a83ed549778735df64748.zip
cpython-89589c90fccf3f34639a83ed549778735df64748.tar.gz
cpython-89589c90fccf3f34639a83ed549778735df64748.tar.bz2
Don't assume that os.confstr_names exists.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index fe2a228..557f04d 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -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: