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

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Jun 17 07:15:01 UTC 2013


Fabian Deutsch has posted comments on this change.

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


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File src/ovirt/node/utils/system.py
Line 214:     def set_layout(self, layout):
Line 215:         assert layout
Line 216:         try:
Line 217:             __import__("systemd")
Line 218:             utils.process.check_call("localectl set-keymap %s ||: " % layout)
I'd suggest using process.call if the purpose of adding "|| :" is to ignore the return value of localectl.
Is the __import__("systemd") line intended to detect if systemd is installed? If so I'd suggest moving this out into e.g. ovirt.node.utils.system.has_systemd() which then returns a bool, that way we can also easily use it in other places.
Line 219:         except:
Line 220:             self.kbd.set(layout)
Line 221:             self.kbd.write()
Line 222:             self.kbd.activate()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id2b0b0c33a6cc515db7087aca67afbeee2a6a377
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list