mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Proper replacement for portage.dep.strip_empty() with list comprehension, pep8fix
This commit is contained in:
parent
2851a5cf13
commit
7576872280
1 changed files with 2 additions and 2 deletions
|
@ -227,7 +227,7 @@ def _merge_flags(new_flags, old_flags=None, conf='any'):
|
|||
old_flags = []
|
||||
args = [old_flags, new_flags]
|
||||
if conf == 'accept_keywords':
|
||||
tmp = new_flags+ \
|
||||
tmp = new_flags + \
|
||||
[i for i in old_flags if _check_accept_keywords(new_flags, i)]
|
||||
else:
|
||||
tmp = portage.flatten(args)
|
||||
|
@ -274,7 +274,7 @@ def append_to_package_conf(conf, atom='', flags=None, string='', overwrite=False
|
|||
new_flags = list(flags)
|
||||
else:
|
||||
atom = string.strip().split()[0]
|
||||
new_flags = filter(None,string.strip().split(' '))[1:]
|
||||
new_flags = [flag for flag in string.strip().split(' ') if flag][1:]
|
||||
if '/' not in atom:
|
||||
atom = _p_to_cp(atom)
|
||||
string = '{0} {1}'.format(atom, ' '.join(new_flags))
|
||||
|
|
Loading…
Add table
Reference in a new issue