mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fiddle with first item in packages
This commit is contained in:
parent
1705365c74
commit
eefe0c39c7
@ -597,7 +597,8 @@ def file_list(*packages):
|
||||
ret = []
|
||||
cmd = ['pacman', '-Ql']
|
||||
|
||||
if os.path.exists(packages[0]):
|
||||
if len(packages) > 0 and os.path.exists(packages[0]):
|
||||
packages = list(packages)
|
||||
cmd.extend(('-r', packages.pop(0)))
|
||||
|
||||
cmd.extend(packages)
|
||||
@ -630,7 +631,8 @@ def file_dict(*packages):
|
||||
ret = {}
|
||||
cmd = ['pacman', '-Ql']
|
||||
|
||||
if os.path.exists(packages[0]):
|
||||
if len(packages) > 0 and os.path.exists(packages[0]):
|
||||
packages = list(packages)
|
||||
cmd.extend(('-r', packages.pop(0)))
|
||||
|
||||
cmd.extend(packages)
|
||||
|
Loading…
Reference in New Issue
Block a user