Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthieu Boileau
nbcourse
Commits
b5954b39
Commit
b5954b39
authored
Nov 26, 2019
by
Matthieu Boileau
Browse files
Fix bug in update_dict()
parent
a4551db1
Changes
2
Show whitespace changes
Inline
Side-by-side
nbcourse/nbcourse.py
View file @
b5954b39
...
...
@@ -48,6 +48,12 @@ class NbCourse:
'slug_title'
:
'course'
,
'output_dir'
:
'build'
,
'title'
:
'A course'
,
'subtitle'
:
None
,
'favicon'
:
None
,
'picture'
:
None
,
'authors'
:
[],
'chapter_preview_only'
:
[],
'license'
:
None
,
'links'
:
[{
'title'
:
'Manual'
,
'target'
:
'manual.html'
,
...
...
nbcourse/utils.py
View file @
b5954b39
...
...
@@ -33,7 +33,7 @@ def clean_tree(target):
def
update_dict
(
current
:
dict
,
new
:
dict
):
"""Update current multi-level dict with new dict"""
for
k
,
v
in
new
.
items
():
if
k
in
current
and
type
(
v
)
is
dict
:
if
k
in
current
and
type
(
current
[
k
])
is
dict
and
type
(
v
)
is
dict
:
# Update current entry by descending into sub dict
update_dict
(
current
[
k
],
v
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment