Merge pull request #46690 from dincamihai/2018.3

Fix unicode handling in pkg.info_installed
This commit is contained in:
Nicole Thomas 2018-03-29 10:10:47 -04:00 committed by GitHub
commit 4609a7dd85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,11 @@ class _Zypper(object):
if self.error_msg and not self.__no_raise and not self.__ignore_repo_failure:
raise CommandExecutionError('Zypper command failure: {0}'.format(self.error_msg))
return self._is_xml_mode() and dom.parseString(self.__call_result['stdout']) or self.__call_result['stdout']
return (
self._is_xml_mode() and
dom.parseString(salt.utils.stringutils.to_str(self.__call_result['stdout'])) or
self.__call_result['stdout']
)
__zypper__ = _Zypper()