[node-patches] Change in ovirt-node[master]: Let us clear the console path
rbarry at redhat.com
rbarry at redhat.com
Tue Oct 21 14:15:59 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Let us clear the console path
......................................................................
Let us clear the console path
There was a bad comparison previously, so empty values could not
be used, and would not have cleared the console path in any case.
Make this possible.
Change-Id: I6857bd9c6c347da96a1221d2d824942aed603f0a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1153922
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/setup/core/status_page.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/17/34317/1
diff --git a/src/ovirt/node/setup/core/status_page.py b/src/ovirt/node/setup/core/status_page.py
index 1627e11..b1e47e5 100644
--- a/src/ovirt/node/setup/core/status_page.py
+++ b/src/ovirt/node/setup/core/status_page.py
@@ -140,7 +140,7 @@
def on_change(self, changes):
if "console.path" in changes:
- if "console.path" is not "" and not os.path.exists(
+ if changes["console.path"] != '' and not os.path.exists(
changes["console.path"].split(',')[0]):
raise exceptions.InvalidData("Console path must be a valid"
"device or empty")
@@ -286,8 +286,10 @@
def _console(self, console_path=None):
def real_console():
b = Bootloader().Arguments()
- if not console_path:
+ if console_path is None:
return b.get("console", "")
+ elif not console_path:
+ del b["console"]
else:
b["console"] = str(console_path)
return self.plugin.dry_or(real_console) or ""
--
To view, visit http://gerrit.ovirt.org/34317
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6857bd9c6c347da96a1221d2d824942aed603f0a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list