Commit 3b0feea5 authored by Georgios Dagkakis's avatar Georgios Dagkakis

External Method: patch so that it raises if a space exists in given id

parent 504ce33f
......@@ -23,6 +23,14 @@ class _(PatchClass(ExternalMethod)):
reloadIfChanged = getFuncDefaults = getFuncCode = filepath = None
def __init__(self, id, title, module, function):
# START PATCH: do not allow spaces in id
if ' ' in id:
raise ValueError('External Method id cannot contain spaces!')
# END PATCH: do not allow spaces in id
self.id=id
self.manage_edit(title, module, function)
@property
def func_defaults(self):
return self._getFunction()[1]
......
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