aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2016-11-22 22:19:49 -0800
committerRoss Brattain <ross.b.brattain@intel.com>2016-11-22 22:20:50 -0800
commite6d468e6a2d055be230a58e1741976eb86d54c5d (patch)
treeb5bcd5fb0eac141dc3583b44642a88a4a3a17549 /api
parent0e23c697e6329a57ba168cc57886b436ea87cdc4 (diff)
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 <ross.b.brattain@intel.com>
Diffstat (limited to 'api')
-rw-r--r--api/utils/influx.py2
1 files changed, 1 insertions, 1 deletions
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):