From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: location@lists.ipfire.org Subject: Re: [PATCH] location-importer.in: Braindead me accidentally forgot a "break" statement Date: Wed, 11 Aug 2021 12:06:05 +0200 Message-ID: <165FD5C1-745A-4324-B4F5-59764F1C2478@ipfire.org> In-Reply-To: <30da2ce0-0eba-4def-d127-217f8071db25@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1162013621277182867==" List-Id: --===============1162013621277182867== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Okay, merged. Thank you for the clarification. > On 9 Aug 2021, at 15:05, Peter M=C3=BCller wro= te: >=20 > Hello Michael, >=20 > yes: All networks processed in this for-loop have the same country code set. > If one of them is found to have an invalid country code set, all the others= of > this batch will do so as well - there is no need to check them individually. >=20 > Thanks, and best regards, > Peter M=C3=BCller >=20 >=20 >> Hello, >>=20 >> Are you sure you don=E2=80=99t want this to be =E2=80=9Ccontinue=E2=80=9D? >>=20 >>> On 8 Aug 2021, at 23:31, Peter M=C3=BCller w= rote: >>>=20 >>> This one apparently went down the drain between these two patches: >>> - https://patchwork.ipfire.org/project/location/patch/20210522125758.2877= 0-1-peter.mueller(a)ipfire.org/ >>> - https://patchwork.ipfire.org/project/location/patch/aefd1904-4b38-f5cf-= ab1d-9d69636cf914(a)ipfire.org/ >>>=20 >>> Due to other safeguards, the current damage in production is limited to: >>>=20 >>> location=3D# SELECT * FROM networks WHERE country =3D 'ZZ'; >>> network | country | original_countries | source >>> --------------------+---------+--------------------+-------- >>> 130.195.64.0/19 | ZZ | {ZZ} | APNIC >>> 130.195.96.0/19 | ZZ | {ZZ} | APNIC >>> 122.252.24.0/21 | ZZ | {ZZ} | APNIC >>> 2406:840:10::/48 | ZZ | {ZZ} | APNIC >>> 2406:840:fd0f::/48 | ZZ | {ZZ} | APNIC >>> (5 rows) >>>=20 >>> Fixes: #12673 >>>=20 >>> Signed-off-by: Peter M=C3=BCller >>> --- >>> src/python/location-importer.in | 1 + >>> 1 file changed, 1 insertion(+) >>>=20 >>> diff --git a/src/python/location-importer.in b/src/python/location-import= er.in >>> index bec0b62..da058d3 100644 >>> --- a/src/python/location-importer.in >>> +++ b/src/python/location-importer.in >>> @@ -702,6 +702,7 @@ class CLI(object): >>> if validcountries and invalidcountries: >>> log.warning("Skipping network with bogus countr(y|ies) %s (original = countries: %s): %s" % \ >>> (invalidcountries, inetnum.get("country"), inetnum.get("inet6num") = or inetnum.get("inetnum"))) >>> + break >>>=20 >>> # Everything is fine here, run INSERT statement... >>> self.db.execute("INSERT INTO _rirdata(network, country, original_coun= tries, source) \ >>> --=20 >>> 2.26.2 >>=20 --===============1162013621277182867==--