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@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()
Fri, Jan 15, 2016 at 08:24:54PM CET, jtluka@redhat.com wrote:
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
Please use following format next time: Fixes: b5c5e5ef35 ("lnst-pool-wizard: add support for hostlist in interactive mode")
Applied.
lnst-developers@lists.fedorahosted.org