From decbd069fafcbb59cadc3672fa479c3ac2ff9cbc Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 8 Mar 2012 15:27:35 +0100 Subject: [PATCH] sim: fix message debug formatting --- migen/sim/ipc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.30.2