Files
salt/split-only-strings-if-they-are-such.patch
Mihai Dincă 34c91909fc Accepting request 573717 from systemsmanagement:saltstack:testing
- Prevent queryformat pattern from expanding (bsc#1079048)

- Fix epoch handling for Rhel 6 and 7 (bsc#1068566)
- Reverting to current API for split_input
- Added:
  * yumpkg-don-t-use-diff_attr-when-determining-install-.patch
- Removed:
  * fix-for-wrong-version-processing.patch

- Fix for wrong version processing during yum pkg install (bsc#1068566)
- Older logrotate need su directive (bsc#1071322)

OBS-URL: https://build.opensuse.org/request/show/573717
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=110
2018-02-08 11:05:40 +00:00

51 lines
2.0 KiB
Diff

From 3fa025fc994d307e08ef271ca8463fe837891a63 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.13.6