[reportlab-users] bug in CallerMacro
Bryan Oakley
bryan.oakley at gmail.com
Thu Mar 8 14:30:02 EST 2012
I've found what appears to be a bug in CallerMacro. Here's the first part
of the definition of the class:
class CallerMacro(Flowable):
'''
like Macro, but with callable command(s)
drawCallable(self)
wrapCallable(self,aW,aH)
'''
def __init__(self, drawCallable=None, wrapCallable=None):
_ = lambda *args: None
self._drawCallable = drawCallable or _
self._wrapCallable = wrapCallable or _
def __repr__(self):
return "CallerMacro(%s)" % repr(self.command)
Notice how __repr__ references self.command, but this particular class does
not define self.command. When I try to use it I get the error:
...
File "c:\Python27\lib\site-packages\reportlab\platypus\flowables.py",
line 615, in __repr__
return "CallerMacro(%s)" % repr(self.command)
AttributeError: CallerMacro instance has no attribute 'command'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120308/fe56ab7f/attachment.htm>
More information about the reportlab-users
mailing list