commit dde8878b8c81a3721f1d1ef79d2596219c0c2547
Author: Jacek Konieczny <[email protected]>
Date:   Thu Nov 1 17:32:43 2012 +0100

    ZeroDivisionError fix

 crmsh-zero_division.patch | 12 ++++++++++++
 crmsh.spec                |  2 ++
 2 files changed, 14 insertions(+)
---
diff --git a/crmsh.spec b/crmsh.spec
index 9c88dce..947344c 100644
--- a/crmsh.spec
+++ b/crmsh.spec
@@ -12,6 +12,7 @@ Group:                Applications/System
 Source0:       
http://hg.savannah.gnu.org/hgweb/crmsh/archive/%{changeset_id}.tar.bz2
 # Source0-md5: f4d0a4d30498c3b5ee73ff8b70eb3005
 Patch0:                %{name}-awk.patch
+Patch1:                %{name}-zero_division.patch
 URL:           https://savannah.nongnu.org/projects/crmsh/
 BuildRequires: asciidoc
 BuildRequires: autoconf
@@ -32,6 +33,7 @@ Contains the 'crm' utility which was part of Pacemaker < 1.1.8
 %prep
 %setup -qn %{name}-%{changeset_id}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal}
diff --git a/crmsh-zero_division.patch b/crmsh-zero_division.patch
new file mode 100644
index 0000000..378fefb
--- /dev/null
+++ b/crmsh-zero_division.patch
@@ -0,0 +1,12 @@
+diff -dur crmsh-b6bb311c7bd3.orig/modules/utils.py 
crmsh-b6bb311c7bd3/modules/utils.py
+--- crmsh-b6bb311c7bd3.orig/modules/utils.py   2012-10-15 20:13:49.000000000 
+0200
++++ crmsh-b6bb311c7bd3/modules/utils.py        2012-11-01 17:22:51.115436156 
+0100
+@@ -620,6 +620,8 @@
+         if len(s) > max_len:
+             max_len = len(s)
+     cols = w/(max_len + min_gap)  # approx.
++    if not cols:
++        cols = 1
+     col_len = w/cols
+     for i in range(len(l)/cols + 1):
+         s = ''
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crmsh.git/commitdiff/dde8878b8c81a3721f1d1ef79d2596219c0c2547

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to