From 556b6fb987e04d7898c5520298c4e1f07b234434 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 22 Nov 2017 21:49:36 +0100 Subject: [PATCH 1/1] client: fix getting the response --- client-scripts/dyn-ns-client | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-scripts/dyn-ns-client b/client-scripts/dyn-ns-client index 85c2910..e5eb56e 100755 --- a/client-scripts/dyn-ns-client +++ b/client-scripts/dyn-ns-client @@ -51,9 +51,9 @@ def getConfigDir(): def urlopen(url, config): if sys.version_info >= (3, 4, 3): - return urllib.request.urlopen(url, context=sslContext(config)).read().decode('utf-8').strip() + return urllib.request.urlopen(url, context=sslContext(config)).read().decode('utf-8').strip('\n') else: - return urllib.request.urlopen(url).read().decode('utf-8').strip() + return urllib.request.urlopen(url).read().decode('utf-8').strip('\n') def getMyIP(family, config, methods = {}, verbose = 0): '''Returns our current IP address ( can be "IPv4" or "IPv6"), detected as given by the configuration. -- 2.30.2