salt/0017-Check-for-single-quote-before-splitting-on-single-qu.patch
Klaus Kämpf 14ef6d2b51 Accepting request 430691 from systemsmanagement:saltstack:testing
- splitting out the susemanager integration plugins into their own
  subpackages. ATM this only contains the zypp plugin to tell
  susemanager about manually installed packages.

- Unit and integration tests fixes for 2016.3.2
  Add:
  * 0018-Unit-tests-fixes-for-2016.3.2.patch
  * 0019-Fix-snapper_test-for-python26.patch
  * 0020-Integration-tests-fixes-for-2016.3.2.patch

- Prevent pkg.install failure for expired keys (bsc#996455)
  Add:
  * 0017-Check-for-single-quote-before-splitting-on-single-qu.patch

- Required D-Bus and generating machine ID where it is missing

- Fix sphinx crashes when documentation is being generated
  Add script for documentation update.
  Add:
  * 0016-Improve-Mock-to-be-flexible-and-able-to-mock-methods.patch
  * update-documentation.sh

- Fix pkg.installed refresh repo failure (bsc#993549)
  Fix salt.states.pkgrepo.management no change failure (bsc#990440)
  Add:
  * 0014-Add-ignore_repo_failure-option-to-suppress-zypper-s-.patch
  * 0015-Remove-zypper-s-raise-exception-if-mod_repo-has-no-a.patch

- Deprecate status.uptime one version later
  Add:

OBS-URL: https://build.opensuse.org/request/show/430691
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=77
2016-09-28 07:49:13 +00:00

36 lines
1.1 KiB
Diff

From e9b4a199f48abc94be71082c56b6b059c6694dc0 Mon Sep 17 00:00:00 2001
From: Eric Jackson <swiftgist@gmail.com>
Date: Tue, 30 Aug 2016 15:47:07 -0400
Subject: [PATCH 17/17] Check for single quote before splitting on single quote
Signed-off-by: Eric Jackson <ejackson@suse.com>
Lint for #35916
Merges #35916
---
salt/modules/zypper.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 1ec903e..4bb9a09 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -859,11 +859,11 @@ def refresh_db():
for line in out.splitlines():
if not line:
continue
- if line.strip().startswith('Repository'):
+ if line.strip().startswith('Repository') and '\'' in line:
key = line.split('\'')[1].strip()
if 'is up to date' in line:
ret[key] = False
- elif line.strip().startswith('Building'):
+ elif line.strip().startswith('Building') and '\'' in line:
key = line.split('\'')[1].strip()
if 'done' in line:
ret[key] = True
--
2.8.2