From e6d468e6a2d055be230a58e1741976eb86d54c5d Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Tue, 22 Nov 2016 22:19:49 -0800 Subject: influx: use urlsplit.hostname instead of netloc turns out urlsplit supports .hostname so we don't have to split netloc Change-Id: I09614812296a216a369559bf55d66d94380feb94 Signed-off-by: Ross Brattain --- api/utils/influx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/utils/influx.py b/api/utils/influx.py index 52a90b61c..1d56c95fd 100644 --- a/api/utils/influx.py +++ b/api/utils/influx.py @@ -29,7 +29,7 @@ def get_data_db_client(): def _get_ip(url): - return urlsplit(url).netloc.split(':')[0] + return urlsplit(url).hostname def _write_data(measurement, field, timestamp, tags): -- cgit 1.2.3-korg