]> git.pld-linux.org Git - packages/crmsh.git/commitdiff
ZeroDivisionError fix auto/th/crmsh-1.2.1-1
authorJacek Konieczny <jajcus@jajcus.net>
Thu, 1 Nov 2012 16:32:43 +0000 (17:32 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Thu, 1 Nov 2012 16:32:43 +0000 (17:32 +0100)
crmsh-zero_division.patch [new file with mode: 0644]
crmsh.spec

diff --git a/crmsh-zero_division.patch b/crmsh-zero_division.patch
new file mode 100644 (file)
index 0000000..378fefb
--- /dev/null
@@ -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 = ''
index 9c88dce06747d43fe1d19ab695801178db50c879..947344c3df0f8309fbd28c4d5a7b78f828994566 100644 (file)
@@ -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}
This page took 0.068014 seconds and 4 git commands to generate.