From a434d020b4751f038ad10c5dbca38f54ea4cb8ad Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 6 Dec 2017 08:58:41 +0100 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gtester-report b/glib/gtester-report index 4f201435e..7d3139f58 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