From: Ralf Jung Date: Wed, 22 Nov 2017 20:49:36 +0000 (+0100) Subject: client: fix getting the response X-Git-Url: https://git.ralfj.de/dyn-nsupdate.git/commitdiff_plain/556b6fb987e04d7898c5520298c4e1f07b234434?ds=sidebyside client: fix getting the response --- 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.