]> git.openstreetmap.org Git - nominatim.git/commitdiff
avoid multiple returns of same value
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 11 Jul 2021 16:23:42 +0000 (18:23 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 11 Jul 2021 16:23:42 +0000 (18:23 +0200)
Found by Sonarqube.

nominatim/tools/special_phrases/sp_importer.py

index 48764518e6e267088834ff46f68b1222cfbc739d..e36b74394c6ea53bd62df14f9e38cf5ca59eabad 100644 (file)
@@ -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