Revision: 342
Author: troy.melhase
Date: Thu Dec 3 16:20:25 2009
Log: Fixes string formatting for messages with no items.
http://code.google.com/p/ibpy/source/detail?r=342
Modified:
/trunk/ib/opt/message.py
=======================================
--- /trunk/ib/opt/message.py Wed Aug 13 15:19:52 2008
+++ /trunk/ib/opt/message.py Thu Dec 3 16:20:25 2009
@@ -70,7 +70,7 @@
"""
name = self.typeName
items = str.join(', ', ['%s=%s' % item for item in self.items()])
- return '<%s %s>' % (name, items)
+ return '<%s%s>' % (name, (' ' + items) if items else '')
def items(self):
""" List of message (slot, slot value) pairs, as 2-tuples.