Commit e6ea52fd authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Fix bug in nbcourse.yml loading

parent 3e534e84
Pipeline #5520 passed with stage
in 31 seconds
......@@ -5,7 +5,7 @@ Define a NbCourse object containing:
- Doit tasks defined in task_*() functions
"""
from pathlib import Path
from pathlib import Path, PosixPath
import yaml
import sys
from doit.tools import create_folder, config_changed
......@@ -61,6 +61,7 @@ class NbCourse:
def __init__(self, user_conf=None):
"""Build from user_conf"""
self.conf = self._get_config(user_conf)
print(self.conf)
self.conf['template_path'] = Path(self.conf['theme']['dir'],
'templates')
for key in 'nb', 'theme':
......@@ -125,7 +126,7 @@ class NbCourse:
del(k)
conf = self.default_conf.copy()
if type(user_conf) is Path:
if type(user_conf) is PosixPath:
# Load user conf as file and update default conf
config_file = user_conf
# Load YAML file as dict
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment