]> git.openstreetmap.org Git - nominatim.git/commitdiff
use pathlib version of open
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 23 Apr 2021 19:57:05 +0000 (21:57 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 23 Apr 2021 20:50:08 +0000 (22:50 +0200)
nominatim/tools/special_phrases.py

index 9d0259dc6e5533314b1fd664e33ce451fc936a27..28a077012024ac3bc49d60f18be87c382e05a0b9 100644 (file)
@@ -116,7 +116,7 @@ class SpecialPhrasesImporter():
         if self.config.PHRASE_CONFIG:
             settings_path = self._convert_php_settings_if_needed(self.config.PHRASE_CONFIG)
 
-        with open(settings_path, "r") as json_settings:
+        with settings_path.open("r") as json_settings:
             settings = json.load(json_settings)
         return settings['blackList'], settings['whiteList']