File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 9
9
"""
10
10
11
11
__title__ = "noipy"
12
- __version_info__ = ('1' , '5' , '1 ' )
12
+ __version_info__ = ('1' , '5' , '2 ' )
13
13
__version__ = "." .join (__version_info__ )
14
14
__author__ = "Pablo O Vieira"
15
15
__email__ = "noipy@pv8.io"
Original file line number Diff line number Diff line change 9
9
10
10
import requests
11
11
12
- HTTPBIN_URL = "http ://httpbin.org/ip"
12
+ HTTPBIN_URL = "https ://httpbin.org/ip"
13
13
14
14
try :
15
15
input = raw_input
@@ -26,7 +26,8 @@ def get_ip():
26
26
"""
27
27
try :
28
28
r = requests .get (HTTPBIN_URL )
29
- return r .json ()['origin' ] if r .status_code == 200 else None
29
+ ip , _ = r .json ()['origin' ].split (',' )
30
+ return ip if r .status_code == 200 else None
30
31
except requests .exceptions .ConnectionError :
31
32
return None
32
33
Original file line number Diff line number Diff line change 9
9
10
10
commands =
11
11
python --version
12
- coverage run --source noipy -m pytest {posargs}
12
+ coverage run --source noipy -m pytest -s -v {posargs}
13
13
coverage report -m
14
14
15
15
[testenv:pep8]
You can’t perform that action at this time.
0 commit comments