Alon Bar-Lev has uploaded a new change for review.

Change subject: dialog: human: accept empty note text
......................................................................

dialog: human: accept empty note text

Change-Id: I739d19094423e694b738ddb8c99eb13c7718fe85
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M ChangeLog
M src/plugins/otopi/dialog/human.py
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/70/13670/1

diff --git a/ChangeLog b/ChangeLog
index 3abee8d..fe47058 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
  * packagers: yum: do not enable if running non root.
  * packagers: yum: selinux: do not change type to rpm_t.
  * java: do not fail to set null environment.
+ * dialog: fix handling of empty string notes.
 
 2013-02-14 - Version 1.0.0
 
diff --git a/src/plugins/otopi/dialog/human.py 
b/src/plugins/otopi/dialog/human.py
index 4089b98..1e1e963 100644
--- a/src/plugins/otopi/dialog/human.py
+++ b/src/plugins/otopi/dialog/human.py
@@ -134,10 +134,11 @@
         text = str(text)
 
         lines = text.splitlines()
-        for line in lines[:-1]:
-            printline(line)
-        printline(lines[-1], newline=not prompt)
-        self._flush()
+        if len(lines) > 0:
+            for line in lines[:-1]:
+                printline(line)
+            printline(lines[-1], newline=not prompt)
+            self._flush()
 
     def queryString(
         self,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I739d19094423e694b738ddb8c99eb13c7718fe85
Gerrit-PatchSet: 1
Gerrit-Project: otopi
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to