in r10:
file: /waveapi/document.py
line 197: local variable 'props' referenced before assignment
in function ElementFromJson the problem is that props is only defined if
etype == ELEMENT_TYPE.GADGET. When etype == ELEMENT_TYPE.IMAGE it is also
used but not defined before.
if etype == ELEMENT_TYPE.GADGET:
props = json['properties'].copy()
url = props['url']
del props['url']
return Gadget(url=url, props=props)
elif etype == ELEMENT_TYPE.IMAGE:
return Image(url=props.get('url', ''),
width=props.get('width'),
height=props.get('height'),
attachment_id=props.get('attachment_id'),
caption=props.get('caption'))
Original issue reported on code.google.com by dafire@gmail.com on 20 Jul 2009 at 8:58
Original issue reported on code.google.com by
dafire@gmail.com
on 20 Jul 2009 at 8:58