salt/remove-obsolete-unicode-handling-in-pkg.info_install.patch
Mihai Dincă bbe3fe8f72 Accepting request 586784 from systemsmanagement:saltstack:testing
- Update patches
- Modified:
  * run-salt-master-as-dedicated-salt-user.patch
  * run-salt-api-as-user-salt-bsc-1064520.patch
  * fix-openscap-push.patch
  * fix-cp.push-empty-file.patch
  * avoid-excessive-syslogging-by-watchdog-cronjob-58.patch
  * feat-add-grain-for-all-fqdns.patch
  * fix-bsc-1065792.patch
  * move-log_file-option-to-changeable-defaults.patch
  * activate-all-beacons-sources-config-pillar-grains.patch
  * remove-obsolete-unicode-handling-in-pkg.info_install.patch
  
- Removed:
  * salt-ssh-fix-json-load-of-return-data-when-it-contai.patch
  
-------------------------------------------------------------------                                                                                                     
                                                                                    
- Update cp.push patch
- Modified:
  * fix-cp.push-empty-file.patch
  * salt-ssh-fix-json-load-of-return-data-when-it-contai.patch

- force re-generate a new thin.tgz when an update gets installed

- fix salt-ssh with a different patch
- remove: dumps-should-return-unicode-also-with-py2-to-prevent.patch
- added: salt-ssh-fix-json-load-of-return-data-when-it-contai.patch
- Added:

OBS-URL: https://build.opensuse.org/request/show/586784
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=115
2018-03-19 08:54:13 +00:00

43 lines
1.8 KiB
Diff

From a29071d597553184ea39f7c5783b0bd4f29fab2b Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de>
Date: Tue, 13 Feb 2018 16:11:20 +0100
Subject: [PATCH] Remove obsolete unicode handling in pkg.info_installed
---
salt/modules/zypper.py | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 51d01c3fc9..659d8858f0 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -309,7 +309,7 @@ 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(self.__call_result['stdout'].encode('utf-8')) or self.__call_result['stdout']
__zypper__ = _Zypper()
@@ -482,15 +482,6 @@ def info_installed(*names, **kwargs):
t_nfo = dict()
# Translate dpkg-specific keys to a common structure
for key, value in six.iteritems(pkg_nfo):
- if isinstance(value, six.string_types):
- # Check, if string is encoded in a proper UTF-8
- if six.PY3:
- value_ = value.encode('UTF-8', 'ignore').decode('UTF-8', 'ignore')
- else:
- value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore')
- if value != value_:
- value = kwargs.get('errors', 'ignore') == 'ignore' and value_ or 'N/A (invalid UTF-8)'
- log.error('Package %s has bad UTF-8 code in %s: %s', pkg_name, key, value)
if key == 'source_rpm':
t_nfo['source'] = value
else:
--
2.16.2