Commit 03cfd4b1 authored by Denis Bilenko's avatar Denis Bilenko

test_ssl.py: do not use ImportError to detect python3. do the right import from the start.

parent fe74cda7
......@@ -12,25 +12,19 @@ import os
import errno
import pprint
try:
if sys.version_info[0] == 3:
from urllib import request as urllib
except:
from urllib import parse as urlparse
from http.server import HTTPServer, SimpleHTTPRequestHandler
else:
import urllib
try:
import urlparse
except ImportError:
from urllib import parse as urlparse
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import traceback
import weakref
try:
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
except ImportError:
from http.server import HTTPServer, SimpleHTTPRequestHandler
try:
bytearray
except NameError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment