From patchwork Tue Nov 3 15:31:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 3638 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4CQYfB5Kp0z3wgl for ; Tue, 3 Nov 2020 15:31:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CQYfB3GhNzn5; Tue, 3 Nov 2020 15:31:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4CQYfB2pDzz2xZH; Tue, 3 Nov 2020 15:31:14 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4CQYf903V7z2xjX for ; Tue, 3 Nov 2020 15:31:12 +0000 (UTC) Received: from location02.haj.ipfire.org (location02.haj.ipfire.org [172.28.1.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "location02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CQYf60VX3zn5; Tue, 3 Nov 2020 15:31:10 +0000 (UTC) Received: by location02.haj.ipfire.org (Postfix, from userid 0) id 4CQYf56sPNz10rT; Tue, 3 Nov 2020 15:31:09 +0000 (UTC) From: =?utf-8?q?Peter_M=C3=BCller?= To: location@lists.ipfire.org Subject: [PATCH] location-importer.in: always convert organisation handles into upper cases Date: Tue, 3 Nov 2020 15:31:08 +0000 Message-Id: <20201103153108.17131-1-peter.mueller@ipfire.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Fixes: #12523 Signed-off-by: Peter Müller --- src/python/location-importer.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index 864eab1..2dec89e 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -560,7 +560,7 @@ class CLI(object): autnum["asn"] = m.group(2) elif key == "org": - autnum[key] = val + autnum[key] = val.upper() # Skip empty objects if not autnum: @@ -646,7 +646,9 @@ class CLI(object): # Split line key, val = split_line(line) - if key in ("organisation", "org-name"): + if key == "organisation": + org[key] = val.upper() + elif key == "org-name": org[key] = val # Skip empty objects