Commit fe74cda7 authored by Denis Bilenko's avatar Denis Bilenko

test__examples.py: do not use ImportError to detected Python3. Do the right import the first time.

parent 045e21f8
...@@ -3,10 +3,10 @@ import os ...@@ -3,10 +3,10 @@ import os
import glob import glob
from os.path import join, abspath, dirname, normpath, basename from os.path import join, abspath, dirname, normpath, basename
import unittest import unittest
try: if sys.version_info[0] == 3:
import urllib2
except ImportError:
from urllib import request as urllib2 from urllib import request as urllib2
else:
import urllib2
import time import time
import signal import signal
import re import re
......
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