Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Denis Salem
VenC
Commits
fc570f40
Commit
fc570f40
authored
Apr 24, 2020
by
Denis Salem
Browse files
fix issue 14: remove yaml loader warning accordingly with pyyaml recommandation
parent
72240700
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/venc2/datastore/configuration.py
View file @
fc570f40
...
...
@@ -26,7 +26,13 @@ from venc2.l10n import messages
def
get_blog_configuration
():
try
:
blog_configuration
=
yaml
.
load
(
open
(
os
.
getcwd
()
+
"/blog_configuration.yaml"
,
'r'
).
read
())
blog_configuration
=
yaml
.
load
(
open
(
os
.
getcwd
()
+
"/blog_configuration.yaml"
,
'r'
).
read
(),
Loader
=
yaml
.
FullLoader
)
mandatory_fields
=
[
"blog_name"
,
...
...
src/venc2/datastore/entry.py
View file @
fc570f40
...
...
@@ -72,7 +72,7 @@ class Entry:
self
.
content
=
ProcessedString
(
entry_parted
[
2
],
filename
)
try
:
metadata
=
yaml
.
load
(
entry_parted
[
0
])
metadata
=
yaml
.
load
(
entry_parted
[
0
]
,
Loader
=
yaml
.
FullLoader
)
except
yaml
.
scanner
.
ScannerError
as
e
:
die
(
messages
.
possible_malformed_entry
.
format
(
filename
,
''
),
extra
=
str
(
e
))
...
...
Write
Preview
Markdown
is supported
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