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@redhat.com --- lnst/Controller/Wizard.py | 12 +++++++----- 1 file 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:
lnst-developers@lists.fedorahosted.org