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 <[EMAIL PROTECTED]>

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
[email protected]
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Reply via email to