Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6627efa

Browse files
author
aviau
committed
Formatting improvements
* ``if value`` can lead to errors
1 parent 7553d73 commit 6627efa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

influxdb/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def __init__(self,
9797

9898
self._headers = {
9999
'Content-type': 'application/json',
100-
'Accept': 'text/plain'}
100+
'Accept': 'text/plain'
101+
}
101102

102103
@staticmethod
103104
def from_DSN(dsn, **kwargs):
@@ -394,17 +395,17 @@ def _write_points(self,
394395
'points': points
395396
}
396397

397-
if tags:
398+
if tags is not None:
398399
data['tags'] = tags
399400

400401
params = {
401402
'db': database or self._database
402403
}
403404

404-
if time_precision:
405+
if time_precision is not None:
405406
params['precision'] = time_precision
406407

407-
if retention_policy:
408+
if retention_policy is not None:
408409
params['rp'] = retention_policy
409410

410411
if self.use_udp:

0 commit comments

Comments
 (0)