Permalink
Browse files

sim: fix message debug formatting

  • Loading branch information...
1 parent 98e96b3 commit decbd069fafcbb59cadc3672fa479c3ac2ff9cbc @sbourdeauducq sbourdeauducq committed Mar 8, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 migen/sim/ipc.py
View
@@ -15,12 +15,14 @@ def __init__(self, *pvalues):
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

0 comments on commit decbd06

Please sign in to comment.