From 619924d05ff41810446a296fbd6edbeb66d7facf Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Thu, 24 Apr 2014 14:58:09 -0400 Subject: [PATCH] Remove mod_wsgi test client's dependency on py3compat. --- test/mod_wsgi_test/test_client.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/mod_wsgi_test/test_client.py b/test/mod_wsgi_test/test_client.py index 6d0e5d657..a0b1885b5 100644 --- a/test/mod_wsgi_test/test_client.py +++ b/test/mod_wsgi_test/test_client.py @@ -21,12 +21,18 @@ import time from optparse import OptionParser -from bson.py3compat import PY3, thread - -if PY3: - from urllib.request import urlopen -else: +try: from urllib2 import urlopen +except ImportError: + # Python 3. + from urllib.request import urlopen + + +try: + import thread +except ImportError: + # Python 3. + import _thread as thread def parse_args():