From patchwork Sun Aug 14 16:02:55 2022 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: 5861 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 "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4M5Mdc5fRZz3wfT for ; Sun, 14 Aug 2022 16:03:16 +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 "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4M5Mdb1lmSzy3; Sun, 14 Aug 2022 16:03:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4M5Mdb0TRWz2xK6; Sun, 14 Aug 2022 16:03:15 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4M5MdX62BVz2xDK for ; Sun, 14 Aug 2022 16:03:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4M5MdW2LJVzV8 for ; Sun, 14 Aug 2022 16:03:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1660492992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUqN0jFB2OtNF/9MAQBFjE26nLLUzXFppsmoiQ3gmxY=; b=j14rTr2jurUBiGf3weVPjNcefh/Duy9Ct3AC9MFMWNADb7kVbkTwb3fa47I0a1mCKVJA3X wuXD3btmbZg+OIAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1660492992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUqN0jFB2OtNF/9MAQBFjE26nLLUzXFppsmoiQ3gmxY=; b=XBQ25MIQFz5keQqAJxD0QeVQ0+gka1PEUBvFFldMQ+CPjCtA/PqLEHvfq8rGmfv94Eqqqb MvEDaJKBl5aD9HtFGTwNo1kavpD5Lv7DorhYZ95zWPDA+kJNRRrC6Mm1nvRFw307EXswfc MJZI8EnpXT2F1cdX1OmiHiil7yT5T+VOizHDHnjqwbbRfvEZzGydBIkQFFMRcdIZY6k/bt g5bE/39rVmMYPO9msbR/ouOIpzciqoS125nLPHogDg5wr8cHA3UaxOCQ+NbFhM4WDeZYV2 GbKvRwFvTKvN/8Hv0OrPMWnvh1KJk5qxsmwdx2o5rDljDv1rFzrgr33wGfgw7A== Message-ID: <452c5644-c309-78d0-3d3d-2ef123b08805@ipfire.org> Date: Sun, 14 Aug 2022 16:02:55 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Location" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] location-importer.in: Fix dangling variable 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" This fixes: Traceback (most recent call last): File "/usr/bin/location-importer", line 1607, in main() File "/usr/bin/location-importer", line 1605, in main c.run() File "/usr/bin/location-importer", line 140, in run ret = args.func(args) File "/usr/bin/location-importer", line 1234, in handle_update_overrides self._update_overrides_for_spamhaus_drop() File "/usr/bin/location-importer", line 1504, in _update_overrides_for_spamhaus_drop for sline in t.readlines(): NameError: name 't' is not defined Signed-off-by: Peter Müller --- src/scripts/location-importer.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index 1785791..8d47497 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -1499,7 +1499,7 @@ class CLI(object): # Iterate through every line, filter comments and add remaining ASNs to # the override table in case they are valid... with self.db.transaction(): - for sline in t.readlines(): + for sline in f.readlines(): # The response is assumed to be encoded in UTF-8... sline = sline.decode("utf-8")