mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
lastgenre: Fix failing CI tests by using syspath
when loading c14n file.
This commit is contained in:
parent
5ff88b46cf
commit
a98fa054fe
1 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ import yaml
|
|||
|
||||
from beets import config, library, plugins, ui
|
||||
from beets.library import Album, Item
|
||||
from beets.util import normpath, plurality, unique_list
|
||||
from beets.util import normpath, plurality, syspath, unique_list
|
||||
|
||||
LASTFM = pylast.LastFMNetwork(api_key=plugins.LASTFM_KEY)
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
if c14n_filename:
|
||||
self._log.debug("Loading canonicalization tree {0}", c14n_filename)
|
||||
with codecs.open(
|
||||
str(normpath(c14n_filename)), "r", encoding="utf-8"
|
||||
syspath(normpath(c14n_filename)), "r", encoding="utf-8"
|
||||
) as f:
|
||||
genres_tree = yaml.safe_load(f)
|
||||
flatten_tree(genres_tree, [], c14n_branches)
|
||||
|
|
|
|||
Loading…
Reference in a new issue