mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
scripts: fix logic error in argv wrapping code
The first piece of the command we process must be added to the list straight away regardless of whether it starts with a '-' or not. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
f253dc90f5
commit
2a1b0e51dd
@ -59,7 +59,7 @@ def rewrap_line(line):
|
||||
# If there's a leading '-' then this is a new
|
||||
# parameter, otherwise its a value for the prev
|
||||
# parameter.
|
||||
if bit.startswith("-"):
|
||||
if bit.startswith("-") or len(args) == 0:
|
||||
args.append(bit)
|
||||
else:
|
||||
args[-1] = args[-1] + " " + bit
|
||||
|
Loading…
Reference in New Issue
Block a user