From 06b8666a53ffb6b3340918fa66ab202f10d67426 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sun, 24 Apr 2016 12:35:30 +0200 Subject: [PATCH] influxdb: just strip() response --- artiq/frontend/artiq_influxdb.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/artiq/frontend/artiq_influxdb.py b/artiq/frontend/artiq_influxdb.py index c178c4367..e65497923 100755 --- a/artiq/frontend/artiq_influxdb.py +++ b/artiq/frontend/artiq_influxdb.py @@ -116,9 +116,7 @@ class DBWriter(TaskObject): k, exc_info=True) else: if response.status not in (200, 204): - content = (await response.content.read()).decode() - if content: - content = content[:-1] # drop \n + content = (await response.content.read()).decode().strip() logger.warning("got HTTP status %d " "trying to update '%s': %s", response.status, k, content)