dpkt
dpkt copied to clipboard
On windows, check if the file is opened in binary mode
Often times, windows users open the files with the wrong mode. Unfortunately, the file mode property is read-only, so we can not fix it on the fly. Raise an exception instead.
Why are all the builds suddenly failing? Seems to be related to https://github.com/pypa/setuptools/issues/937. I'll poke around on it. Okay.. I'm not sure what's going on with Travis CI.. I'm going to wait a day and see if they figure it out/clear it up.
Coverage decreased (-0.6%) to 87.878% when pulling fad3d74548ff73e73a367c623e25fa09bde499b5 on pcap_binary_mode into 6754f4489686e27a878b482fc750e82130583c8d on master.
Okay the tests on TravisCI are now properly running again... there are two failed tests...
def __init__(self, fileobj, snaplen=1500, linktype=DLT_EN10MB, nano=False):
> if fileobj.mode != 'wb':
E AttributeError: 'BytesIO' object has no attribute 'mode'
and then a test for the deprecated decorator (I don't totally understand why that is failing).
going to look at this some more later today. I have a bunch of more updates for pcap.py anyway
Shrug... somehow the builds are failing... will have to circle back to this and see if I can figure out the issues...