Commits

Anonymous committed 9332425

Fix version check by using list approach - change between 2.6 and 2.7 to a class - see issue #6

Comments (0)

Files changed (4)

 from . import xmlnamespace
 from . import xmlparser
 import sys
-if sys.version_info.major < 3:
+if sys.version_info[0] < 3:
     from urllib2 import urlopen, Request, HTTPError
 else:
     from urllib.request import urlopen, Request, HTTPError
 """
 import xml.etree.cElementTree as etree
 import sys
-if sys.version_info.major < 3:
+if sys.version_info[0] < 3:
     from urllib2 import urlopen, HTTPError
 else:
     from urllib.request import urlopen, HTTPError
 import xml.etree.cElementTree as etree
 import base64
 import sys
-if sys.version_info.major > 2:
+if sys.version_info[0] > 2:
     unicode = str
 
 
 from osa.xmltypes import *
 from tests.base import BaseTest
 import unittest
-if sys.version_info.major < 3:
+if sys.version_info[0] < 3:
     from urllib2 import urlopen, HTTPError, URLError
 else:
     from urllib.request import urlopen, HTTPError, URLError