[PATCH] virt-convert: fix option handling

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

 



Fix up options handling for input dirs.

If we specify an input directory, and no output, then default to placing
a config file in the input directory.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/virt-convert b/virt-convert
--- a/virt-convert
+++ b/virt-convert
@@ -80,6 +80,8 @@ def parse_args():
     if len(args) == 1:
         options.output_file = None
         options.output_dir = None
+        if os.path.isdir(args[0]):
+            options.output_dir = options.input_dir
     elif os.path.isdir(args[1]) or args[1].endswith("/"):
         options.output_file = None
         options.output_dir = args[1]

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux