fix(mariadb): encode Popen() returns
subprocess.Popen() returns byte object by defect which has issue with operations that treats thing as str. This ensure Popen() encodes the return as utf-8 before we do anything. Change-Id: I321771f69cfcb492be1308c61313a0598b1e766a Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
19a1fbf8f7
commit
6e84da7671
@ -547,7 +547,8 @@ def update_grastate_on_restart():
|
||||
'--wsrep_cluster_address=gcomm://', '--wsrep-recover'
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
stderr=subprocess.PIPE,
|
||||
encoding="utf-8")
|
||||
out, err = wsrep_recover.communicate()
|
||||
wsrep_rec_pos = '-1'
|
||||
for item in err.split("\n"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user