10000 DRY: "database or self._database" is already handled at self.query() … · mattrobenolt/influxdb-python@9ae3e17 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ae3e17

Browse files
author
Grégory Starck
committed
DRY: "database or self._database" is already handled at self.query() level.
1 parent 1c5fed3 commit 9ae3e17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

influxdb/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def create_retention_policy(
324324
query_string = \
325325
"CREATE RETENTION POLICY %s ON %s " \
326326
"DURATION %s REPLICATION %s" % \
327-
(name, (database or self._database), duration, replication)
327+
(name, database or self._database, duration, replication)
328328

329329
if default is True:
330330
query_string += " DEFAULT"
@@ -343,7 +343,7 @@ def get_list_series(self, database=None):
343343
"""
344344
Get the list of series
345345
"""
346-
return self.query("SHOW SERIES", database=(database or self._database))
346+
return self.query("SHOW SERIES", database=database)
347347

348348
def get_list_users(self):
349349
"""

0 commit comments

Comments
 (0)
0