[glib/glib-2-54] gtester-report: fix range usage when running as python3 app



commit a434d020b4751f038ad10c5dbca38f54ea4cb8ad
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 4f20143..7d3139f 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 = ' &nbsp;' # HTML won't compress alternating sequences of ' ' and '&nbsp;'
   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]