public inbox for location@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] location-importer.in: Fix dangling variable
@ 2022-08-14 16:02 Peter Müller
  2022-08-14 16:05 ` Michael Tremer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Müller @ 2022-08-14 16:02 UTC (permalink / raw)
  To: location

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

This fixes:

Traceback (most recent call last):
  File "/usr/bin/location-importer", line 1607, in <module>
    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 <peter.mueller(a)ipfire.org>
---
 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")
 
-- 
2.35.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] location-importer.in: Fix dangling variable
  2022-08-14 16:02 [PATCH] location-importer.in: Fix dangling variable Peter Müller
@ 2022-08-14 16:05 ` Michael Tremer
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tremer @ 2022-08-14 16:05 UTC (permalink / raw)
  To: location

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

Thx. Merged.

> On 14 Aug 2022, at 17:02, Peter Müller <peter.mueller(a)ipfire.org> wrote:
> 
> This fixes:
> 
> Traceback (most recent call last):
> File "/usr/bin/location-importer", line 1607, in <module>
>   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 <peter.mueller(a)ipfire.org>
> ---
> 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")
> 
> -- 
> 2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-14 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-14 16:02 [PATCH] location-importer.in: Fix dangling variable Peter Müller
2022-08-14 16:05 ` Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox