test fixes

This commit is contained in:
Andrey Abramov 2019-06-21 15:39:00 +03:00
parent 1f3c1a7532
commit a115bdbe8b

View File

@ -29,8 +29,7 @@ for var in ('accept_keywords', 'use', 'mask'):
if var not in package_vars:
continue
value = package_vars[var] if isinstance(package_vars[var], six.string_types) else ' '.join(package_vars[var])
verspec = cp if var == 'use' else process_target(cp, package_vars.get('version'))
result.append((verspec, value))
result.append((process_target(cp, package_vars.get('version')), value))
result_str = ''.join([ "{} {}\n".format(cp, value) for cp, value in sorted(result) ])
filename = '/etc/portage/package.{}/SALT'.format(var)
File.managed(filename, contents=result_str, mode='0640',