File 0071-Check-for-single-quote-before-splitting-on-single-qu.patch of Package salt.3314
From 08154be42fcd5b033e84803cdab182b228667249 Mon Sep 17 00:00:00 2001
From: Eric Jackson <swiftgist@gmail.com>
Date: Tue, 30 Aug 2016 15:47:07 -0400
Subject: [PATCH 71/71] 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 fa803ac..5782d7f 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -830,11 +830,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