mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
replace portage.dep.strip_empty() with list comprehension
This commit is contained in:
parent
7576872280
commit
aa032ccfaf
1 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ def append_to_package_conf(conf, atom='', flags=None, string='', overwrite=False
|
|||
new_contents += string.strip() + '\n'
|
||||
added = True
|
||||
else:
|
||||
old_flags = portage.dep.strip_empty(l_strip.split(' '))[1:]
|
||||
old_flags = [flag for flag in l_strip.split(' ') if flag][1:]
|
||||
if conf == 'accept_keywords':
|
||||
if not old_flags:
|
||||
new_contents += l
|
||||
|
@ -415,7 +415,7 @@ def get_flags_from_package_conf(conf, atom):
|
|||
line_package = line.split()[0]
|
||||
line_list = _porttree().dbapi.xmatch("match-all", line_package)
|
||||
if match_list.issubset(line_list):
|
||||
f_tmp = portage.dep.strip_empty(line.strip().split()[1:])
|
||||
f_tmp = [flag for flag in line.strip().split(' ') if flag][1:]
|
||||
if f_tmp:
|
||||
flags.extend(f_tmp)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue