Closed powerswitch closed 3 years ago
@powerswitch @rliebscher @obormot So pulling this branch locally, the tests run fine. When I merge master the tests are failing due to the changes pulled in with the merge of #502. So two options: 1) Someone else merges master into this branch and makes sure the test all pass (just run 'tox' at the top level) 2) I'll do it..make a new PR.. and merge...
Also I think I'm going to put some branch protections on master, to avoid stuff like this in future :)
dpkt/pcapng.py::test_writepkt_epb_ts FAILED
dpkt/pcapng.py::test_custom_read_write FAILED
Both tests fail with the same error
dpkt/pcapng.py:376: in __init__
self._validate_block('idb', idb_, InterfaceDescriptionBlock)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dpkt.pcapng.Writer object at 0x102f6fd30>, arg_name = 'idb', blk = ('type', 1)
expected_cls = <class 'dpkt.pcapng.InterfaceDescriptionBlock'>
def _validate_block(self, arg_name, blk, expected_cls):
"""Check a user-defined block for correct type and endianness"""
if not isinstance(blk, expected_cls):
> raise ValueError('{0}: expecting class {1}'.format(
arg_name, expected_cls.__name__))
E ValueError: idb: expecting class InterfaceDescriptionBlock
dpkt/pcapng.py:397: ValueError
Hi @brifordwylie, sorry for the long absence. I'm only capable to work on the project rarely. But now I'm on holidays, so I pick it up again.
I'll merge the latest master onto the branch and run the tox tests again, will fix them and push the changes. Again, sorry for the delay
@powerswitch @rliebscher looks good, thanks a bunch for the contribution... merging now.
Current version only supports one InterfaceDescriptionBlock, but in general it is allowed to have more then one.
This patch extends the interface so you can provide alternatively a sequence of InterfaceDescriptionBlock instances (or anything which is iterable).
This commit was created by the patch provided as ZIP file by René Liebscher as attachment to the issue.