Commit 69cbd1e4 authored by Penom Nom's avatar Penom Nom
Browse files

Fix bug which occurs when the method add_component is written on several lines.

parent 4df5a539
......@@ -101,8 +101,15 @@ class Workflow(threading.Thread):
self._serialize()
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]
for i in range(0, len(workflow_command_lines)):
line = workflow_command_lines[i]
if line.find("self.add_component") != -1:
while re.search('\\\s*$', line) : # While line ends with backslash
# Concatenate next line
i += 1
next_line = workflow_command_lines[i]
line = re.search('(.+)\\\s*$', line).groups()[0] + next_line
component_prefix = "default"
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]
......
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