]> git.ipfire.org Git - location/libloc.git/commit
export: Don't fail when output stream isn't seekable
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jun 2022 13:04:59 +0000 (13:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jun 2022 13:04:59 +0000 (13:04 +0000)
commita4c22636cea523fa809eaa4a5f15c85532f806ed
tree6d31b0024d6f2aed7f210e23ca62c6114ee24f0a
parent846d4188670fce4ab4c1e7f6864c2c43f0e378ad
export: Don't fail when output stream isn't seekable

For the ipset format, we will rewrite the header after we know the total
number of entries that have been written in order to optimise the hash
table.

When the output stream isn't seekable, we cannot write the header again
which is being fixed in this patch.

Fixes: #12885
Reported-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location/export.py