The remaining arguments not processed by getopt saved in args variable is
always list, either empty or non-empty therefore check has to be for the
length of args.
The recent commit made interactive mode broken if a user did not specify
hosts.
Fixes: b5c5e5ef357769cbc9676108d50b270b289f46b8
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst-pool-wizard | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lnst-pool-wizard b/lnst-pool-wizard
index 8313e74..ea2849b 100755
--- a/lnst-pool-wizard
+++ b/lnst-pool-wizard
@@ -51,6 +51,7 @@ def main():
pool_dir = None
mode = "interactive"
+ hostlist = None
for opt, arg in opts:
if opt in ("-h", "--help"):
@@ -72,7 +73,7 @@ def main():
else:
help(RETVAL_ERR)
- if args is not None:
+ if len(args) > 0:
hostlist = args
wizard = Wizard()
--
2.4.3