Merge "Fix potential divide by zero in display_html" am: 524311b26d
am: 41e721028a
Change-Id: Iac24401f1c8370f80824b56d63dffebd36081f13
This commit is contained in:
@@ -244,7 +244,10 @@ def display_html(total, node, extra):
|
|||||||
lib = fd.library
|
lib = fd.library
|
||||||
else:
|
else:
|
||||||
lib = os.path.basename(fd.library)
|
lib = os.path.basename(fd.library)
|
||||||
label = "%d %6.2f%% %6d %s%s %s %s" % (node.size, 100*node.size/float(total), node.number, extra, lib, fd.function, fd.location)
|
total_percent = 0
|
||||||
|
if total != 0:
|
||||||
|
total_percent = 100 * node.size / float(total)
|
||||||
|
label = "%d %6.2f%% %6d %s%s %s %s" % (node.size, total_percent, node.number, extra, lib, fd.function, fd.location)
|
||||||
label = label.replace("&", "&")
|
label = label.replace("&", "&")
|
||||||
label = label.replace("'", "'")
|
label = label.replace("'", "'")
|
||||||
label = label.replace('"', """)
|
label = label.replace('"', """)
|
||||||
|
|||||||
Reference in New Issue
Block a user