mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #48495 from garethgreenaway/48342_mysql_cache_unicode
[2018.3] Fix to mysql cache module
This commit is contained in:
commit
f9fd1a889a
1 changed files with 6 additions and 2 deletions
8
salt/cache/mysql_cache.py
vendored
8
salt/cache/mysql_cache.py
vendored
|
@ -172,8 +172,12 @@ def store(bank, key, data):
|
|||
'''
|
||||
_init_client()
|
||||
data = __context__['serial'].dumps(data)
|
||||
query = "REPLACE INTO {0} (bank, etcd_key, data) values('{1}', '{2}', " \
|
||||
"'{3}')".format(_table_name, bank, key, data)
|
||||
query = b"REPLACE INTO {0} (bank, etcd_key, data) values('{1}', '{2}', " \
|
||||
b"'{3}')".format(_table_name,
|
||||
bank,
|
||||
key,
|
||||
data)
|
||||
|
||||
cur, cnt = run_query(client, query)
|
||||
cur.close()
|
||||
if cnt not in (1, 2):
|
||||
|
|
Loading…
Add table
Reference in a new issue