]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Decrease the log level if Spamhaus' files are empty
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Jul 2023 10:26:55 +0000 (10:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Jul 2023 10:27:22 +0000 (10:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index 3607e19b3345c9b521ed41a0e7d8d84778af6b1f..28a4f6c18c1d0b8cbd1f10b6bf8b5384a20650c7 100644 (file)
@@ -1702,7 +1702,7 @@ class CLI(object):
                                if len(fcontent) > 10:
                                        self.db.execute("DELETE FROM network_overrides WHERE source = %s", name)
                                else:
-                                       log.error("%s (%s) returned likely bogus file, ignored" % (name, url))
+                                       log.warning("%s (%s) returned likely bogus file, ignored" % (name, url))
                                        continue
 
                                # Iterate through every line, filter comments and add remaining networks to
@@ -1754,7 +1754,7 @@ class CLI(object):
                                if len(fcontent) > 10:
                                        self.db.execute("DELETE FROM autnum_overrides WHERE source = %s", name)
                                else:
-                                       log.error("%s (%s) returned likely bogus file, ignored" % (name, url))
+                                       log.warning("%s (%s) returned likely bogus file, ignored" % (name, url))
                                        continue
 
                                # Iterate through every line, filter comments and add remaining ASNs to