]> 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>
Sat, 24 Apr 2021 13:13:47 +0000 (15:13 +0200)
nominatim/tools/special_phrases.py

index d172498a13fdc6fb7268e7c71a02d2ce0989e2a5..eec6a0c4d5f3bb30313bf3113a3d2d55a1679d74 100644 (file)
@@ -65,7 +65,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']