1. sboz
  2. osa

Commits

Sergey A. Bozhenkov  committed 9332425

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

  • Participants
  • Parent commits 013773e
  • Branches default

Comments (0)

Files changed (4)

File osa/method.py

View file
 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

File osa/xmlparser.py

View file
 """
 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

File osa/xmltypes.py

View file
 import xml.etree.cElementTree as etree
 import base64
 import sys
-if sys.version_info.major > 2:
+if sys.version_info[0] > 2:
     unicode = str
 
 

File tests/test_client.py

View file
 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