From: Michael Tremer Date: Thu, 19 Nov 2020 12:41:19 +0000 (+0000) Subject: export: Speed-up export in xt_geoip format X-Git-Tag: 0.9.5~46 X-Git-Url: http://git.ipfire.org/?p=location%2Flibloc.git;a=commitdiff_plain;h=90188dad86223380b0854b523b63ec024117c5f2 export: Speed-up export in xt_geoip format Removing the loop avoids creating a tuple and then iterating over it Signed-off-by: Michael Tremer --- diff --git a/src/python/export.py b/src/python/export.py index 4702bcf..f0eae26 100644 --- a/src/python/export.py +++ b/src/python/export.py @@ -120,8 +120,8 @@ class XTGeoIPOutputWriter(OutputWriter): mode = "wb" def write(self, network): - for address in (network._first_address, network._last_address): - self.f.write(address) + self.f.write(network._first_address) + self.f.write(network._last_address) formats = {