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
This commit is contained in:
Dominique Leuenberger 2017-12-06 08:58:41 +01:00 committed by Philip Withnall
parent 4bbfb963ab
commit a434d020b4

View File

@ -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