File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ install:
1111 - pip install -r requirements.txt
1212 - pip install git+https://github.com/maxmind/HTTPretty.git
1313 - pip install pylint coveralls
14- - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 ipaddr ; fi
15- - if [[ $TRAVIS_PYTHON_VERSION == '2.7 ' ]]; then pip install ipaddr; fi
14+ - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
15+ - if [[ $TRAVIS_PYTHON_VERSION != '3.3 ' ]]; then pip install ipaddr; fi
1616
1717script :
1818 - coverage run --source=geoip2 setup.py test
Original file line number Diff line number Diff line change 102102
103103import sys
104104
105- if sys .version_info [0 ] == 2 :
106- import ipaddr as ipaddress
105+ if sys .version_info [0 ] == 2 or (sys .version_info [0 ] == 3
106+ and sys .version_info [1 ] < 3 ):
107+ import ipaddr as ipaddress #pylint:disable=F0401
107108 ipaddress .ip_address = ipaddress .IPAddress
108109else :
109- import ipaddress
110+ import ipaddress #pylint:disable=F0401
110111
111112class Client (object ):
112113 """This method creates a new client object.
Original file line number Diff line number Diff line change 1818
1919requirements = [i .strip () for i in open ("requirements.txt" ).readlines ()]
2020
21- if sys .version_info [0 ] == 2 :
21+ if sys .version_info [0 ] == 2 or (sys .version_info [0 ] == 3
22+ and sys .version_info [1 ] < 3 ):
2223 requirements .append ('ipaddr' )
2324
2425setup (
You can’t perform that action at this time.
0 commit comments