diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-24 22:31:35 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-30 16:18:48 -0400 |
commit | 8ba14779884b2d1913de1ae4abf6fdeea130838a (patch) | |
tree | 26cba3be6ea5be35afb4fe84c60f10ca752b4437 /tests/functional/features/steps | |
parent | 598c9823f514f42e42edc62b785178777e928a73 (diff) |
[tests] workaround some errors while running tests
Diffstat (limited to 'tests/functional/features/steps')
-rw-r--r-- | tests/functional/features/steps/vpn.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/functional/features/steps/vpn.py b/tests/functional/features/steps/vpn.py index 05ed2b54..43673597 100644 --- a/tests/functional/features/steps/vpn.py +++ b/tests/functional/features/steps/vpn.py @@ -15,12 +15,16 @@ def record_ip(context): def _current_ip(): - url = 'https://wtfismyip.com/json' + url = 'https://ipapi.co/json' r = requests.get(url) - data = r.json() + try: + data = r.json() + except Exception: + print("ERROR: data received was %s" % r.content) + raise - current_ip = data['YourFuckingIPAddress'] + current_ip = data.get('ip') print("Current IP: %s\n\n" % current_ip) return current_ip |