From eba9a4b692d10429608a15effc425e9b5e0d2d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 11 Jun 2018 19:10:23 +0200 Subject: [PATCH] fix: last commit. --- bgpranking/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpranking/parser.py b/bgpranking/parser.py index 6388667..9e9152c 100644 --- a/bgpranking/parser.py +++ b/bgpranking/parser.py @@ -59,7 +59,9 @@ class RawFilesParser(): def parse_raw_files(self): set_running(f'{self.__class__.__name__}-{self.source}') - self.logger.warning('Was unable to parse {} files.'.format(len([f for f in self.unparsable_dir.iterdir() if f.is_file()]))) + nb_unparsable_files = len([f for f in self.unparsable_dir.iterdir() if f.is_file()]) + if nb_unparsable_files: + self.logger.warning(f'Was unable to parse {nb_unparsable_files} files.') try: for filepath in self.files_to_parse: self.logger.debug('Parsing {}, {} to go.'.format(filepath, len(self.files_to_parse) - 1))