From: Sebastien Bourdeauducq Date: Thu, 8 Mar 2012 14:27:35 +0000 (+0100) Subject: sim: fix message debug formatting X-Git-Tag: 24jan2021_ls180~2099^2~986 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=decbd069fafcbb59cadc3672fa479c3ac2ff9cbc;p=litex.git sim: fix message debug formatting --- diff --git a/migen/sim/ipc.py b/migen/sim/ipc.py index ca59c4f7..5d9f9eb6 100644 --- a/migen/sim/ipc.py +++ b/migen/sim/ipc.py @@ -15,12 +15,14 @@ class Message: setattr(self, parameter[1], value) def __str__(self): - p = "" + p = [] for parameter in self.parameters: - p += parameter[1] + "=" + str(getattr(self, parameter[1])) + p.append(parameter[1] + "=" + str(getattr(self, parameter[1]))) if p: - p = " " + p - return "<" + self.__class__.__name__ + p + ">" + pf = " " + " ".join(p) + else: + pf = "" + return "<" + self.__class__.__name__ + pf + ">" class MessageTick(Message): code = 0