From: Sarah Hoffmann Date: Fri, 23 Apr 2021 19:57:05 +0000 (+0200) Subject: use pathlib version of open X-Git-Tag: v4.0.0~102^2~3 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/280406c0d7c447bd033229b8c5137cc4eefaf71d use pathlib version of open --- diff --git a/nominatim/tools/special_phrases.py b/nominatim/tools/special_phrases.py index 9d0259dc..28a07701 100644 --- a/nominatim/tools/special_phrases.py +++ b/nominatim/tools/special_phrases.py @@ -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']