[libvirt PATCH v2 1/4] scripts: fix logic error in argv wrapping code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 scripts/test-wrap-argv.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/test-wrap-argv.py b/scripts/test-wrap-argv.py
index 4193e6b68d..6b0d3511f3 100755
--- a/scripts/test-wrap-argv.py
+++ b/scripts/test-wrap-argv.py
@@ -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
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux