From 8de8f57dd5ed4925a0ccf0bb08ba3b1813263792 Mon Sep 17 00:00:00 2001 From: Pablo Vieira Date: Wed, 3 Apr 2019 22:26:00 -0400 Subject: [PATCH 1/3] (feat): handle new reponse from httpbin.org --- noipy/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/noipy/utils.py b/noipy/utils.py index 7540c94..85fb808 100644 --- a/noipy/utils.py +++ b/noipy/utils.py @@ -9,7 +9,7 @@ import requests -HTTPBIN_URL = "http://httpbin.org/ip" +HTTPBIN_URL = "https://httpbin.org/ip" try: input = raw_input @@ -26,7 +26,8 @@ def get_ip(): """ try: r = requests.get(HTTPBIN_URL) - return r.json()['origin'] if r.status_code == 200 else None + ip, _ = r.json()['origin'].split(',') + return ip if r.status_code == 200 else None except requests.exceptions.ConnectionError: return None From cfec900ea97f0eb46486f2047bdcef223f735380 Mon Sep 17 00:00:00 2001 From: Pablo Vieira Date: Wed, 3 Apr 2019 22:28:04 -0400 Subject: [PATCH 2/3] (chore): change pytest run to be verbose --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3414b3e..5f3368b 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ deps = commands = python --version - coverage run --source noipy -m pytest {posargs} + coverage run --source noipy -m pytest -s -v {posargs} coverage report -m [testenv:pep8] From dd25d76c2c0a140bca20916f5e56b0af69212e34 Mon Sep 17 00:00:00 2001 From: Pablo Vieira Date: Wed, 3 Apr 2019 22:31:28 -0400 Subject: [PATCH 3/3] (chore): bump version to 1.5.2 --- noipy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noipy/__init__.py b/noipy/__init__.py index 118d90d..b131ae6 100644 --- a/noipy/__init__.py +++ b/noipy/__init__.py @@ -9,7 +9,7 @@ """ __title__ = "noipy" -__version_info__ = ('1', '5', '1') +__version_info__ = ('1', '5', '2') __version__ = ".".join(__version_info__) __author__ = "Pablo O Vieira" __email__ = "noipy@pv8.io"