Sandro Bonazzola has uploaded a new change for review.

Change subject: package: setup: avoid endless loop using answer file
......................................................................

package: setup: avoid endless loop using answer file

avoid endless loop at console customization stage
when using answer file.

Change-Id: I35b0d51830a77e3cd61eefd97c573eea4aa7af53
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
1 file changed, 13 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/12/17712/1

diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
index d1dbf17..e26f431 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
@@ -222,19 +222,22 @@
                     default='vnc',
                 )
 
-                if answer in answermap:
-                    validConsole = True
+                if answer in answermap.keys():
                     self.environment[
                         ohostedcons.VMEnv.CONSOLE_TYPE
                     ] = answermap[answer]
-                elif interactive:
-                    self.logger.error(
-                        'Unsuppored console type provided.'
-                    )
-                else:
-                    raise RuntimeError(
-                        _('Unsuppored console type provided.')
-                    )
+            if self.environment[
+                ohostedcons.VMEnv.CONSOLE_TYPE
+            ] in answermap.values():
+                validConsole = True
+            elif interactive:
+                self.logger.error(
+                    'Unsuppored console type provided.'
+                )
+            else:
+                raise RuntimeError(
+                    _('Unsuppored console type provided.')
+                )
 
     @plugin.event(
         stage=plugin.Stages.STAGE_CLOSEUP,


-- 
To view, visit http://gerrit.ovirt.org/17712
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35b0d51830a77e3cd61eefd97c573eea4aa7af53
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to