Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/28607 )

Change subject: python: Manually convert float to int when using %x
......................................................................

python: Manually convert float to int when using %x

This is required by python3.5 which is not allowing a
floating point value to be printed in hex and will trigger
a TypeError assertion:

TypeError: %X format: an integer is required, not float

Change-Id: I2033366751924579cc87e7fccda8fdb33a31412d
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
---
M src/python/m5/util/dot_writer.py
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py
index e6de3f3..c66108d 100644
--- a/src/python/m5/util/dot_writer.py
+++ b/src/python/m5/util/dot_writer.py
@@ -267,7 +267,7 @@
     return dot_rgb_to_html(r, g, b)

 def dot_rgb_to_html(r, g, b):
-    return "#%.2x%.2x%.2x" % (r, g, b)
+    return "#%.2x%.2x%.2x" % (int(r), int(g), int(b))

# We need to create all of the clock domains. We abuse the alpha channel to get
 # the correct domain colouring.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/28607
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v20.0.0.0
Gerrit-Change-Id: I2033366751924579cc87e7fccda8fdb33a31412d
Gerrit-Change-Number: 28607
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to