From 3661f7a321ff3c0599a4808faff2a5dea67f6f18 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 11 Jul 2021 18:23:42 +0200 Subject: [PATCH] avoid multiple returns of same value Found by Sonarqube. --- nominatim/tools/special_phrases/sp_importer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nominatim/tools/special_phrases/sp_importer.py b/nominatim/tools/special_phrases/sp_importer.py index 48764518..e36b7439 100644 --- a/nominatim/tools/special_phrases/sp_importer.py +++ b/nominatim/tools/special_phrases/sp_importer.py @@ -274,9 +274,8 @@ class SPImporter(): (self.phplib_dir / 'migration/PhraseSettingsToJson.php').resolve(), file_path], check=True) LOG.warning('special_phrase configuration file has been converted to json.') - return json_file_path except subprocess.CalledProcessError: LOG.error('Error while converting %s to json.', file_path) raise - else: - return json_file_path + + return json_file_path -- 2.39.5