From: Mark Dickinson Date: Fri, 16 Apr 2010 13:51:27 +0000 (+0000) Subject: Don't assume that os.confstr_names exists. X-Git-Tag: v3.2a1~1137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=89589c90fccf3f34639a83ed549778735df64748;p=thirdparty%2FPython%2Fcpython.git Don't assume that os.confstr_names exists. --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index fe2a228f6b93..557f04d9bf00 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: