[glib] gtester-report: fix range usage when running as python3 app
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtester-report: fix range usage when running as python3 app
- Date: Wed, 6 Dec 2017 10:07:27 +0000 (UTC)
commit 1a07e35b7024b37fc9033f9d28665c96ccebc88a
Author: Dominique Leuenberger <dimstar opensuse org>
Date: Wed Dec 6 08:58:41 2017 +0100
gtester-report: fix range usage when running as python3 app
When using python3 as interpreter, range only takes integer arguments or
it results in errors like:
File "/usr/bin/gtester-report", line 78, in html_indent_string
for i in range (0, (n + 1) / 2):
TypeError: 'float' object cannot be interpreted as an integer
https://bugzilla.gnome.org/show_bug.cgi?id=791296
glib/gtester-report | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gtester-report b/glib/gtester-report
index d11b255..c4790ad 100755
--- a/glib/gtester-report
+++ b/glib/gtester-report
@@ -75,7 +75,7 @@ def attribute_as_text (node, aname, node_name = None):
def html_indent_string (n):
uncollapsible_space = ' ' # HTML won't compress alternating sequences of ' ' and ' '
string = ''
- for i in range (0, (n + 1) / 2):
+ for i in range (0, int((n + 1) / 2)):
string += uncollapsible_space
return string
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]