Closed cclauss closed 5 years ago
Looks great. Thanks for your contribution @cclauss. I have picked your commit while working on another branch. Merged into the latest release https://github.com/Srinivas11789/PcapXray/commit/e84f065607c86db06c727fa9431d449355fd68e7
Looks great! See #33 Just change is not to != in three locations...
flake8 testing of https://github.com/Srinivas11789/PcapXray on Python 3.7.1
$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
./Source/Module/legacy/pcapReader.py:109:12: F632 use ==/!= to compare str, bytes, and int literals
if ipaddress is not "":
^
./Source/Module/legacy/pcapReader.py:111:12: F632 use ==/!= to compare str, bytes, and int literals
if protocol is not "":
^
./Source/Module/legacy/pcapReader.py:113:12: F632 use ==/!= to compare str, bytes, and int literals
if port is not "":
^
3 F632 use ==/!= to compare str, bytes, and int literals
3
Sure. These are changed in the legacy files. Corrected! https://github.com/Srinivas11789/PcapXray/commit/9c2d77fa3eabab1b5c07be50a80e895c613117d8.
Make the minimal, safe changes required to convert the repo's code to be syntax compatible with both Python 2 and Python 3. There may be other changes required to complete a port to Python 3 but this PR is a minimal, safe first step.
Run: futurize --stage1 -w */.py