From 5b9e1bb094be3e6703d5b115a16eb972d95a7cc2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 8 Jun 2020 18:16:24 +0000 Subject: [PATCH] Drop unused format_asn() function Signed-off-by: Michael Tremer --- src/backend/util.py | 8 -------- src/web/__init__.py | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/backend/util.py b/src/backend/util.py index 370c63a0..2252818e 100644 --- a/src/backend/util.py +++ b/src/backend/util.py @@ -154,14 +154,6 @@ class Address(Object): return blacklists -def format_asn(asn): - network = db.get_as(asn) - - if network: - return "%s" % network - - return "AS%s" % asn - def format_size(s, max_unit=None): units = ("B", "kB", "MB", "GB", "TB") diff --git a/src/web/__init__.py b/src/web/__init__.py index 53cb41c1..2851516c 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -50,7 +50,6 @@ class Application(tornado.web.Application): # UI Methods "ui_methods" : { - "format_asn" : self.format_asn, "format_country_name" : self.format_country_name, "format_language_name" : self.format_language_name, "format_month_name" : self.format_month_name, @@ -335,9 +334,6 @@ class Application(tornado.web.Application): logging.info("Successfully initialied application") - def format_asn(self, handler, asn): - return util.format_asn(asn) - def format_country_name(self, handler, country_code): return ipfire.countries.get_name(country_code) -- 2.39.2