ldx/python-iptables — pull request #84 by bmonty (2014-07-26 22:22:13+00:00)
Title: Updates to allow some tests to pass with Python 3.

This patch allows some of the tests to pass when using python-iptables in Python 3. This patch doesn't allow all the tests to pass, but I'm stuck fixing some of the issues. I'm sharing this pull request in case someone else wants to start working on this.

The basic issue I've found is dealing with bytes vs. str. The code is inconsistent in dealing with these types and as a result comparisons with str values throughout the code fail. I've tried to make it consistent where all text is an str within the module. Bytes are converted to str when taken from the C library or coverted to bytes when passed to C.