commit 12d722564fd2deb6de979377c6d54ab44b6c98ec
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri Nov 14 16:10:26 2014 +0100
PoolWizard: don't ask for pool directory for every machine
This patch fixes an issue when user is being prompted for the pool
directory after every machine that is to be added to the pool. The fix
is to move the relevant prompt out of the machine query loop.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/Wizard.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/lnst/Controller/Wizard.py b/lnst/Controller/Wizard.py
index f16c8fa..c38aae5 100644
--- a/lnst/Controller/Wizard.py
+++ b/lnst/Controller/Wizard.py
@@ -33,12 +33,14 @@ class Wizard:
named by user. User can choose which interfaces should be added to the
.xml file.
"""
+
+ pool_dir = raw_input("Enter path to pool directory "\
+ "(default: ~/.lnst/pool): ")
+ if pool_dir != "":
+ self._pool_dir = os.path.expanduser(pool_dir)
+ print "Pool directory set to %s" % self._pool_dir
+
while True:
- pool_dir = raw_input("Enter path to pool directory "\
- "(default: ~/.lnst/pool): ")
- if pool_dir != "":
- self._pool_dir = os.path.expanduser(pool_dir)
- print "Pool directory set to %s" % self._pool_dir
while True:
hostname = raw_input("Enter hostname: ")
try:
Show replies by date