Fixes the _write_header() call to make it possible to write from a generator
Fixes the _write_header() call to make it possible to write from a generator

Thanks @yoeld for reporting and proposing a solution.

--HG--
branch : issue-5111

mytliulei/Scapy,mytliulei/Scapy