From 48d993492398b639cb3f49d75826ce52f36eb6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 27 Sep 2018 16:40:47 -0400 Subject: [PATCH] fix: last commit was broken --- bgpranking/shadowserverfetcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpranking/shadowserverfetcher.py b/bgpranking/shadowserverfetcher.py index 9fe0c99..02bf928 100644 --- a/bgpranking/shadowserverfetcher.py +++ b/bgpranking/shadowserverfetcher.py @@ -87,12 +87,14 @@ class ShadowServerFetcher(): config = {'vendor': 'shadowserver', 'parser': '.parsers.shadowserver'} type_content, _, type_details = self.__split_name(filename) prefix = type_content.split('.')[0] - config['name'] = '{}-{}'.format(prefix, '_'.join(type_details)) if isinstance(type_details, str): main_type = type_details + config['name'] = '{}-{}'.format(prefix, type_details) else: main_type = type_details[0] + config['name'] = '{}-{}'.format(prefix, '_'.join(type_details)) + if main_type not in self.known_list_types: self.logger.warning(f'Unknown type: {main_type}. Please update the config creator script.') return None