[node-patches] Change in ovirt-node[master]: ui: Remove redudant keyboard utils class
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Mar 21 14:44:33 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: ui: Remove redudant keyboard utils class
......................................................................
ui: Remove redudant keyboard utils class
Change-Id: I1331cec4f6d5c83d3d3dd82178db98b81279380f
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/installer/progress_page.py
M scripts/tui/src/ovirt/node/setup/ping.py
M scripts/tui/src/ovirt/node/ui/urwid_builder.py
M scripts/tui/src/ovirt/node/utils/__init__.py
M scripts/tui/src/ovirt/node/utils/storage.py
M scripts/tui/src/ovirt/node/utils/system.py
6 files changed, 4 insertions(+), 27 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/51/13251/1
diff --git a/scripts/tui/src/ovirt/node/installer/progress_page.py b/scripts/tui/src/ovirt/node/installer/progress_page.py
index 9184014..ec6923e 100644
--- a/scripts/tui/src/ovirt/node/installer/progress_page.py
+++ b/scripts/tui/src/ovirt/node/installer/progress_page.py
@@ -271,4 +271,4 @@
super(InstallerThread.SetKeyboardLayout, self).__init__()
def commit(self):
- utils.Keyboard().set_layout(self.kbd_layout)
+ utils.system.Keyboard().set_layout(self.kbd_layout)
diff --git a/scripts/tui/src/ovirt/node/setup/ping.py b/scripts/tui/src/ovirt/node/setup/ping.py
index fcc60b3..0872597 100644
--- a/scripts/tui/src/ovirt/node/setup/ping.py
+++ b/scripts/tui/src/ovirt/node/setup/ping.py
@@ -28,7 +28,6 @@
"""
-
class Plugin(plugins.NodePlugin):
_model = None
diff --git a/scripts/tui/src/ovirt/node/ui/urwid_builder.py b/scripts/tui/src/ovirt/node/ui/urwid_builder.py
index cc70982..3e1f4f0 100644
--- a/scripts/tui/src/ovirt/node/ui/urwid_builder.py
+++ b/scripts/tui/src/ovirt/node/ui/urwid_builder.py
@@ -21,7 +21,6 @@
from ovirt.node import ui, exceptions, base
from ovirt.node.ui import widgets as uw
import os
-import sys
import urwid
"""
diff --git a/scripts/tui/src/ovirt/node/utils/__init__.py b/scripts/tui/src/ovirt/node/utils/__init__.py
index d38db8a..75df0bd 100644
--- a/scripts/tui/src/ovirt/node/utils/__init__.py
+++ b/scripts/tui/src/ovirt/node/utils/__init__.py
@@ -20,7 +20,6 @@
# also available at http://www.gnu.org/copyleft/gpl.html.
from ovirt.node import base, exceptions
import augeas as _augeas
-import system_config_keyboard.keyboard
import time
import traceback
@@ -136,27 +135,6 @@
if len(utxt) > 0 and utxt[0] in ["y", "t", "Y", "T", "1"]:
return True
return False
-
-
-class Keyboard(base.Base):
- def __init__(self):
- super(Keyboard, self).__init__()
- self.kbd = system_config_keyboard.keyboard.Keyboard()
-
- def available_layouts(self):
- self.kbd.read()
- layoutgen = ((details[0], kid)
- for kid, details in self.kbd.modelDict.items())
- layouts = [(kid, name) for name, kid in sorted(layoutgen)]
- return layouts
-
- def set_layout(self, layout):
- self.kbd.set(layout)
- self.kbd.write()
- self.kbd.activate()
-
- def get_current(self):
- return self.kbd.get()
class Transaction(list, base.Base):
diff --git a/scripts/tui/src/ovirt/node/utils/storage.py b/scripts/tui/src/ovirt/node/utils/storage.py
index 45f480a..77eb4a6 100644
--- a/scripts/tui/src/ovirt/node/utils/storage.py
+++ b/scripts/tui/src/ovirt/node/utils/storage.py
@@ -22,6 +22,7 @@
from ovirt.node import base
import os
+
class iSCSI(base.Base):
"""A class to deal with some external iSCSI related functionality
"""
diff --git a/scripts/tui/src/ovirt/node/utils/system.py b/scripts/tui/src/ovirt/node/utils/system.py
index b8782c6..9aa7c36 100644
--- a/scripts/tui/src/ovirt/node/utils/system.py
+++ b/scripts/tui/src/ovirt/node/utils/system.py
@@ -175,8 +175,8 @@
def available_layouts(self):
self.kbd.read()
- layoutgen = ((details[0], kid)
- for kid, details in self.kbd.modelDict.items())
+ layoutgen = ((details[0], kbid)
+ for kbid, details in self.kbd.modelDict.items())
layouts = [(kid, name) for name, kid in sorted(layoutgen)]
return layouts
--
To view, visit http://gerrit.ovirt.org/13251
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1331cec4f6d5c83d3d3dd82178db98b81279380f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list