construct/construct — pull request #24 by wawewawa (2013-05-12 22:31:00+00:00)
Title: IpAddressAdapter python 2.x fix

As of 2.5.1 the IpAddressAdapter stopped working in python 2.x. Instead of writing the IP address bytes to the stream, it would write something similar to " at 0x1a38640>" to the stream, because of the way bytes works in python 2.x.

This change just checks whether bytes is str (as is done in the _decode function) and then avoids using the bytes builtin. I also added some unit tests for the adapter