mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check for single quote before splitting on single quote
Signed-off-by: Eric Jackson <ejackson@suse.com>
This commit is contained in:
parent
678f10cf8b
commit
b5fe6100ee
1 changed files with 2 additions and 2 deletions
|
@ -866,11 +866,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
|
||||
|
|
Loading…
Add table
Reference in a new issue