avonar / impacket

Automatically exported from code.google.com/p/impacket
Other
0 stars 0 forks source link

__str__ Problem #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
print packets without __str__defined (eg. LLC)

What is the expected output? What do you see instead?
Expected was a string. :-)

File "XXXXXXXX\Python26\lib\site-packages\impacket\ImpactPacket.py", line 550, 
in __str__
    tmp_str += '\n' + self.child().__str__()
AttributeError: LLC instance has no attribute '__str__'

What version of the product are you using? On what operating system?
impacket 09.10 with python 2.6.5 on Windows 7

Please provide any additional information below.
You can use str(self.child()) instead of self.child().__str__() which will call 
the __str__ function if defined and if not no exception will be raised and at 
least a little information "<impacket.dot11.LLC instance at 0x02C9B800>" is 
displayed.

Original issue reported on code.google.com by F.Zett...@googlemail.com on 19 Sep 2013 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by bet...@gmail.com on 19 Sep 2013 at 5:23

GoogleCodeExporter commented 9 years ago
Fixed with commit 946

Original comment by aurelian...@gmail.com on 26 Nov 2013 at 5:52