Update CHANGELOG, pep8 fixes

This commit is contained in:
Griatch 2018-10-23 01:04:25 +02:00
parent 0b6d869902
commit b6b07ccdb5
10 changed files with 290 additions and 264 deletions

View file

@ -323,31 +323,31 @@ class DefaultScript(ScriptBase):
or describe a state that changes under certain conditions.
"""
@classmethod
def create(cls, key, **kwargs):
"""
Provides a passthrough interface to the utils.create_script() function.
Args:
key (str): Name of the new object.
Returns:
object (Object): A newly created object of the given typeclass.
errors (list): A list of errors in string form, if any.
"""
errors = []
obj = None
kwargs['key'] = key
try:
obj = create.create_script(**kwargs)
except Exception as e:
errors.append("The script '%s' encountered errors and could not be created." % key)
logger.log_err(e)
return obj, errors
def at_script_creation(self):