Use pathlib in Extension
parent
eacc95c9d7
commit
610ff895fd
|
@ -1,5 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
import os
|
import pathlib
|
||||||
|
|
||||||
from mopidy import config, ext
|
from mopidy import config, ext
|
||||||
|
|
||||||
|
@ -18,8 +18,7 @@ class Extension(ext.Extension):
|
||||||
version = __version__
|
version = __version__
|
||||||
|
|
||||||
def get_default_config(self):
|
def get_default_config(self):
|
||||||
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
|
return config.read(pathlib.Path(__file__).parent / "ext.conf")
|
||||||
return config.read(conf_file)
|
|
||||||
|
|
||||||
def get_config_schema(self):
|
def get_config_schema(self):
|
||||||
schema = super().get_config_schema()
|
schema = super().get_config_schema()
|
||||||
|
|
Loading…
Reference in New Issue