internetarchive / warcprox

WARC writing MITM HTTP/S proxy
371 stars 54 forks source link

`fcntl` module does not exist on Windows #164

Open tari opened 2 years ago

tari commented 2 years ago

warcprox/writer.py imports fcntl to acquire an exclusive lock on files opened for writing, but this fails on Windows because the fcntl module is only available on Unix-like systems. It should either gracefully degrade to not use file locking if the module is not available, or use a portable library like portalocker.