[node-patches] Change in ovirt-node[master]: Force setting the font so all characters appear correctly
rbarry at redhat.com
rbarry at redhat.com
Fri Apr 11 16:16:05 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Force setting the font so all characters appear correctly
......................................................................
Force setting the font so all characters appear correctly
The infinity symbol currently appears as an undefined character.
Call setfont before the TUI comes up to make sure the characters
get loaded.
Change-Id: Ica56d6a1fca1d08a5a83924fdd80813f8e739e58
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1054630
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/app.py
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/17/26717/1
diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index 788bfc9..b051ca7 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -23,6 +23,7 @@
from ovirt.node.config import defaults
from ovirt.node.ui import urwid_builder
from ovirt.node.utils import system, Timer, console
+import os
import sys
"""
@@ -88,6 +89,14 @@
self.logger.info(("Starting '%s' application " +
"with '%s' UI") % (plugin_base, ui_builder))
+ if os.ttyname(sys.stdin.fileno()).startswith("/dev/tty") or \
+ os.ttyname(sys.stdin.fileno()) == "/dev/console":
+ # We're on a physical console, so explicitly load fonts in
+ # case they weren't loaded for some reason
+ self.logger.info("Console path is %s" % os.ttyname(
+ sys.stdin.fileno()))
+ utils.process.check_call(["setfont"])
+
self.args = args
self.__parse_cmdline()
--
To view, visit http://gerrit.ovirt.org/26717
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica56d6a1fca1d08a5a83924fdd80813f8e739e58
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