Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
8e04c8ed
Commit
8e04c8ed
authored
May 22, 2015
by
eric pellegrini
Browse files
Added raise condition for weights configurator
parent
484f4101
Changes
1
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Configurators/WeightsConfigurator.py
View file @
8e04c8ed
...
...
@@ -66,6 +66,9 @@ class WeightsConfigurator(SingleChoiceConfigurator):
:type value: one of the numeric properties of MDANSE.Data.ElementsDatabase.ElementsDatabase
'''
if
not
isinstance
(
value
,
basestring
):
raise
ConfiguratorError
(
"Invalid type for weight. Must be a string."
,
self
)
value
=
value
.
lower
()
if
not
value
in
ELEMENTS
.
numericProperties
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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