From 17639b33d8906eafae68bc56cb74780c0149fcb3 Mon Sep 17 00:00:00 2001 From: Benjamin Hewins Date: Fri, 11 Aug 2017 17:48:40 +0100 Subject: [PATCH] _is_float should return false rather than an error when the object being tested is not a valid param for float() --- influxdb/line_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/line_protocol.py b/influxdb/line_protocol.py index 4ec56dc5..c399a1d5 100644 --- a/influxdb/line_protocol.py +++ b/influxdb/line_protocol.py @@ -75,7 +75,7 @@ def quote_literal(value): def _is_float(value): try: float(value) - except ValueError: + except (TypeError, ValueError): return False return True