Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit c101386

Browse files
committed
Merge pull request #291 from mkren/master
create_user() - added quotes to the username (Thanks @mkren !)
2 parents 1dcda47 + fe30159 commit c101386

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

influxdb/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ def create_user(self, username, password, admin=False):
650650
privileges or not
651651
:type admin: boolean
652652
"""
653-
text = "CREATE USER {0} WITH PASSWORD '{1}'".format(username, password)
653+
text = "CREATE USER \"{0}\" WITH PASSWORD '{1}'".format(username,
654+
password)
654655
if admin:
655656
text += ' WITH ALL PRIVILEGES'
656657
self.query(text)

0 commit comments

Comments
 (0)