From 610ff895fd63d18cc6c0849a910bde16a4bb8175 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Thu, 21 Nov 2019 18:16:56 +0000 Subject: [PATCH] Use pathlib in Extension --- mopidy_raspberry_gpio/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mopidy_raspberry_gpio/__init__.py b/mopidy_raspberry_gpio/__init__.py index 99adcb6..859f10a 100644 --- a/mopidy_raspberry_gpio/__init__.py +++ b/mopidy_raspberry_gpio/__init__.py @@ -1,5 +1,5 @@ import logging -import os +import pathlib from mopidy import config, ext @@ -18,8 +18,7 @@ class Extension(ext.Extension): version = __version__ def get_default_config(self): - conf_file = os.path.join(os.path.dirname(__file__), "ext.conf") - return config.read(conf_file) + return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_config_schema(self): schema = super().get_config_schema()