Commit 18a3cd79 authored by eric pellegrini's avatar eric pellegrini

Small change in MDANSE.Core.UserDefinitions class

parent 19de1651
......@@ -184,6 +184,10 @@ class UserDefinitions(object):
:type ud: MDANSE.Framework.UserDefinables.IUserDefinable derived object
'''
from MDANSE.Framework.UserDefinables.IUserDefinable import IUserDefinable
if not isinstance(ud,IUserDefinable):
raise UserDefinitionsError("Invalid user definition: must be a user definable object")
targets = self.setdefault(unicode(target),{})
categories = targets.setdefault(unicode(category),{})
......
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