Commit 278f118a authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 61a79065
...@@ -101,8 +101,17 @@ class Workflow(threading.Thread): ...@@ -101,8 +101,17 @@ class Workflow(threading.Thread):
self._serialize() self._serialize()
def init_component_nameids(self): def init_component_nameids(self):
for line in inspect.getsourcelines(getattr(self, self.function))[0]: workflow_command_lines = inspect.getsourcelines(getattr(self, self.function))[0]
if line.find("self.add_component") != -1: for i in range(0, len(workflow_command_lines)):
line = workflow_command_lines[i]
if line.find("self.add_component") != -1 and not re.search('^\s*\#', line) :
while re.search('\\\s*$', line) : # While line ends with backslash
# Concatenate next line
i += 1
next_line = workflow_command_lines[i]
if re.search('^\s*\#', next_line) :
nex_line = "\\"
line = re.search('(.+)\\\s*$', line).groups()[0] + next_line
component_prefix = "default" component_prefix = "default"
component_name = line.strip().split("self.add_component")[1][1:-1].split(",")[0][1:-1] component_name = line.strip().split("self.add_component")[1][1:-1].split(",")[0][1:-1]
arguments = re.search("self.add_component\s*\((.+)\)", line).groups()[0] arguments = re.search("self.add_component\s*\((.+)\)", line).groups()[0]
......
Supports Markdown
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