Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
7f55777e
Commit
7f55777e
authored
Mar 15, 2019
by
Samuel GAIST
Browse files
[library] Silence assert warning
parent
c73b726a
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/core/library.py
View file @
7f55777e
...
@@ -147,7 +147,7 @@ class Library(BackendLibrary):
...
@@ -147,7 +147,7 @@ class Library(BackendLibrary):
# At this point, `data' can be a dictionary or ``None``
# At this point, `data' can be a dictionary or ``None``
if
data
is
None
:
# loads the default declaration for an library
if
data
is
None
:
# loads the default declaration for an library
self
.
data
,
self
.
errors
=
prototypes
.
load
(
"library"
)
self
.
data
,
self
.
errors
=
prototypes
.
load
(
"library"
)
assert
not
self
.
errors
,
"
\n
* %s"
%
"
\n
*"
.
join
(
self
.
errors
)
assert
not
self
.
errors
,
"
\n
* %s"
%
"
\n
*"
.
join
(
self
.
errors
)
# nosec
else
:
# just assign it
else
:
# just assign it
# this runs basic validation, including JSON loading if required
# this runs basic validation, including JSON loading if required
self
.
data
,
self
.
errors
=
schema
.
validate
(
"library"
,
data
)
self
.
data
,
self
.
errors
=
schema
.
validate
(
"library"
,
data
)
...
...
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