[node-patches] Change in ovirt-node[master]: House-keeping: Several syntax fixes

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri May 10 17:23:56 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: House-keeping: Several syntax fixes
......................................................................

House-keeping: Several syntax fixes

Change-Id: I04aed25ba913ee33055cb440ee1feb53ff7d5c1f
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/installer/keyboard_page.py
M src/ovirt/node/installer/welcome_page.py
M src/ovirt/node/ui/urwid_builder.py
M src/ovirt/node/ui/widgets.py
M src/ovirt/node/utils/network.py
M src/ovirt/node/utils/process.py
M src/ovirt/node/valid.py
7 files changed, 15 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/59/14659/1

diff --git a/src/ovirt/node/installer/keyboard_page.py b/src/ovirt/node/installer/keyboard_page.py
index 14077fd..1aad75c 100644
--- a/src/ovirt/node/installer/keyboard_page.py
+++ b/src/ovirt/node/installer/keyboard_page.py
@@ -22,7 +22,7 @@
 """
 Keyboard page of the installer
 """
-from ovirt.node import plugins, ui, utils
+from ovirt.node import plugins, ui
 from ovirt.node.utils import system
 
 
diff --git a/src/ovirt/node/installer/welcome_page.py b/src/ovirt/node/installer/welcome_page.py
index f1a3c2c..9106d48 100644
--- a/src/ovirt/node/installer/welcome_page.py
+++ b/src/ovirt/node/installer/welcome_page.py
@@ -85,9 +85,9 @@
 
     def ___installation_options(self):
         if self.application.args.dry:
-            return [ui.Button("button.install", "Install Hypervisor (dry)"),
-                    ui.Button("button.upgrade", "Upgrade Hypervisor (dry)"),
-                    ui.Button("button.downgrade", "Downgrade Hypervisor (dry)")]
+            return [ui.Button("button.install", "Install (dry)"),
+                    ui.Button("button.upgrade", "Upgrade (dry)"),
+                    ui.Button("button.downgrade", "Downgrade (dry)")]
 
         media = utils.system.InstallationMedia()
 
diff --git a/src/ovirt/node/ui/urwid_builder.py b/src/ovirt/node/ui/urwid_builder.py
index 3686782..a9599a5 100644
--- a/src/ovirt/node/ui/urwid_builder.py
+++ b/src/ovirt/node/ui/urwid_builder.py
@@ -253,7 +253,6 @@
 
         return widget
 
-
     def _build_table(self, ui_table):
         children = []
 
@@ -261,8 +260,8 @@
             c = self._build_tableitem(ui_table, key, label)
             children.append(c)
         widget = uw.TableWidget(ui_table.label(), ui_table.header,
-                              children, ui_table.multi,
-                              ui_table.height, ui_table.enabled())
+                                children, ui_table.multi,
+                                ui_table.height, ui_table.enabled())
 
         for c in children:
             c._table = widget
diff --git a/src/ovirt/node/ui/widgets.py b/src/ovirt/node/ui/widgets.py
index 29d6a11..759df59 100644
--- a/src/ovirt/node/ui/widgets.py
+++ b/src/ovirt/node/ui/widgets.py
@@ -229,11 +229,11 @@
                     #Calculate ourselves, subtracting 3 (for the arrows
                     # and the knob itself)
                         self.below_knob = abs(float(list_size - rows) / (rows -
-                                                             3))
+                                                                         3))
                     else:
                         self.below_knob = abs(float(list_size -
-                                        rows) / (rows - 2 -
-                            self.ratio))
+                                                    rows) / (rows - 2 -
+                                                             self.ratio))
                 else:
                     self.below_knob = float(list_size - rows)
                 self.above_knob = int(offset / self.below_knob)
@@ -248,14 +248,14 @@
 
             blocks_above = u'\u2592' * self.above_knob
             blocks_below = u'\u2592' * (rows - self.above_knob - 2 -
-                                 self.truncate(self.knob_height))
+                                        self.truncate(self.knob_height))
 
             self.__text.set_text([('edit', u"▲"), blocks_above +
                                   u"\u2588" * (self.truncate(self.knob_height))
                                   + blocks_below, ('edit', u"▼")])
 
             (self.__rows, self._offset, self.__list_size) = (rows, offset,
-                                                           list_size)
+                                                             list_size)
             self._show_scroll_bar()
         else:
             self._hide_scroll_bar()
diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py
index 694670e..848e42a 100644
--- a/src/ovirt/node/utils/network.py
+++ b/src/ovirt/node/utils/network.py
@@ -533,4 +533,4 @@
     except (OSError, AttributeError):
         print "Warning: could not find __res_init in libresolv.so.2"
         r = -1
-    return r
\ No newline at end of file
+    return r
diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py
index 228c4b1..e20e1da 100644
--- a/src/ovirt/node/utils/process.py
+++ b/src/ovirt/node/utils/process.py
@@ -104,4 +104,4 @@
         process.stdin.write(stdin)
     while process.poll() != 0:
         yield process.stdout.readline()
-    # pylint: enable-msg=E1101
\ No newline at end of file
+    # pylint: enable-msg=E1101
diff --git a/src/ovirt/node/valid.py b/src/ovirt/node/valid.py
index 3165361..14288b7 100644
--- a/src/ovirt/node/valid.py
+++ b/src/ovirt/node/valid.py
@@ -318,6 +318,8 @@
     True
     >>> IPv6Address()("0::0")
     True
+    >>> IPv6Address()("11::22")
+    True
     >>> IPv6Address().validate("0:::0")
     False
     >>> IPv6Address().validate("0::0::0")


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04aed25ba913ee33055cb440ee1feb53ff7d5c1f
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