Fix python3 failure inside guest when doing restore

When the guest agent is running in Python 3, when doing restore, an
exception is raised:
http://paste.openstack.org/show/762068/

Change-Id: I44830465a3e436aa790eb43f0cef0c3d92dbd974
This commit is contained in:
Lingxian Kong 2019-08-23 15:14:37 +12:00
parent 214a6a0b1f
commit 9cf00dfbdf

View File

@ -43,7 +43,7 @@ class MySQLRestoreMixin(object):
# This is a suffix MySQL appends to the file name given in
# the '--log-error' startup parameter.
_ERROR_LOG_SUFFIX = '.err'
_ERROR_MESSAGE_PATTERN = re.compile("ERROR")
_ERROR_MESSAGE_PATTERN = re.compile(b"ERROR")
def mysql_is_running(self):
try: