[Reportbug-commits] [reportbug] 02/02: use integer division when computing the max length for a name; suggestion by Ben Longbons; Closes: #848655
Sandro Tosi
morph at moszumanska.debian.org
Thu Jan 5 00:40:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit ca3f62a98591d24c2b1600a88fed692c3f6b4317
Author: Sandro Tosi <morph at debian.org>
Date: Wed Jan 4 19:40:33 2017 -0500
use integer division when computing the max length for a name; suggestion by Ben Longbons; Closes: #848655
---
debian/changelog | 5 ++++-
reportbug/ui/text_ui.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 39b3045..6f8d542 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,11 @@ reportbug (7.1.2) UNRELEASED; urgency=medium
- fix the 'email' name clash in reportbug.utils functions by renaming their
arguments to 'emailaddr', this fixes names with special characters in the
address; patch by Didier 'OdyX' Raboud; Closes: #848692
+ * reportbug/ui/text_ui.py
+ - use integer division when computing the max length for a name; suggestion
+ by Ben Longbons; Closes: #848655
- -- Sandro Tosi <morph at debian.org> Wed, 04 Jan 2017 19:07:00 -0500
+ -- Sandro Tosi <morph at debian.org> Wed, 04 Jan 2017 19:36:55 -0500
reportbug (7.1.1) unstable; urgency=medium
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index 950eff8..7ea8fd5 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -353,7 +353,7 @@ def menu(par, options, prompt, default=None, title=None, any_ok=False,
allowed = [x[0] for x in options]
allowed = allowed + extras
- maxlen_name = min(max(list(map(len, allowed))), columns / 3)
+ maxlen_name = min(max(list(map(len, allowed))), columns // 3)
digits = int(math.ceil(math.log10(len(options) + 1)))
i = 1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list