b17d3e3575
- Fix the usage of custom macros on the spec file. - Fix RES7: different dependency names for python-PyYAML and python-MarkupSafe - Build both python2 and python3 binaries together. - Bugfix: errors in external pillar causes crash instead of report of them (bsc#1068446) - Fix 'user.present' when 'gid_from_name' is set but group does not exist. - Added: * bugfix-the-logic-according-to-the-exact-described-pu.patch * return-error-when-gid_from_name-and-group-does-not-e.patch - Fix "No service execution module loaded" issue (bsc#1065792) - Set SHELL environment variable Added: * fix-bsc-1065792.patch * set-shell-environment-variable-64.patch - Removed unnecessary logging on shutdown (bsc#1050003) - Renamed patch that adds grain fqdns Changed: * catching-error-when-pidfile-cannot-be-deleted Removed: * fix-for-pidfile-removal-logging Renamed: * add-fqdns-grains -> feat-add-grain-for-all-fqdns OBS-URL: https://build.opensuse.org/request/show/569868 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=107
51 lines
2.0 KiB
Diff
51 lines
2.0 KiB
Diff
From 358d18a0cc635b04503d5392ce337227c1f191af Mon Sep 17 00:00:00 2001
|
|
From: Bo Maryniuk <bo@suse.de>
|
|
Date: Thu, 14 Dec 2017 14:43:52 +0100
|
|
Subject: [PATCH] Split only strings, if they are such
|
|
|
|
* Use unicode literals
|
|
* Lintfix: PEP8
|
|
|
|
See: https://bugzilla.suse.com/show_bug.cgi?id=1072218
|
|
https://github.com/saltstack/salt/pull/44991
|
|
---
|
|
salt/pillar/sql_base.py | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/salt/pillar/sql_base.py b/salt/pillar/sql_base.py
|
|
index e7abceb134..a59c45331f 100644
|
|
--- a/salt/pillar/sql_base.py
|
|
+++ b/salt/pillar/sql_base.py
|
|
@@ -168,7 +168,7 @@ More complete example for MySQL (to also show configuration)
|
|
as_list: True
|
|
with_lists: [1,3]
|
|
'''
|
|
-from __future__ import absolute_import
|
|
+from __future__ import absolute_import, unicode_literals
|
|
|
|
# Please don't strip redundant parentheses from this file.
|
|
# I have added some for clarity.
|
|
@@ -275,7 +275,7 @@ class SqlBaseExtPillar(six.with_metaclass(abc.ABCMeta, object)):
|
|
# May set 'as_list' from qb[1][2].
|
|
else:
|
|
defaults.update(qb[1])
|
|
- if defaults['with_lists']:
|
|
+ if defaults['with_lists'] and isinstance(defaults['with_lists'], six.string_types):
|
|
defaults['with_lists'] = [
|
|
int(i) for i in defaults['with_lists'].split(',')
|
|
]
|
|
@@ -437,8 +437,7 @@ class SqlBaseExtPillar(six.with_metaclass(abc.ABCMeta, object)):
|
|
cursor.execute(details['query'], (minion_id,))
|
|
|
|
# Extract the field names the db has returned and process them
|
|
- self.process_fields([row[0] for row in cursor.description],
|
|
- details['depth'])
|
|
+ self.process_fields([row[0] for row in cursor.description], details['depth'])
|
|
self.enter_root(root)
|
|
self.as_list = details['as_list']
|
|
if details['with_lists']:
|
|
--
|
|
2.15.1
|
|
|
|
|