[node-patches] Change in ovirt-node[master]: EL6: don't fail on missing localectl

mburns at redhat.com mburns at redhat.com
Fri Jun 14 16:33:24 UTC 2013


Michael Burns has uploaded a new change for review.

Change subject: EL6:  don't fail on missing localectl
......................................................................

EL6:  don't fail on missing localectl

on EL6, system-config-keyboard is sufficient to change the locale

Change-Id: Id2b0b0c33a6cc515db7087aca67afbeee2a6a377
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M src/ovirt/node/utils/system.py
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/29/15729/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index c5b9ca6..b74e270 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -213,10 +213,13 @@
 
     def set_layout(self, layout):
         assert layout
-        self.kbd.set(layout)
-        self.kbd.write()
-        self.kbd.activate()
-        utils.process.check_call("localectl set-keymap %s" % layout)
+        try:
+            __import__("systemd")
+            utils.process.check_call("localectl set-keymap %s ||: " % layout)
+        except:
+            self.kbd.set(layout)
+            self.kbd.write()
+            self.kbd.activate()
 
     def reactivate(self):
         self.kbd.activate()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2b0b0c33a6cc515db7087aca67afbeee2a6a377
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list