Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
a3c79eb8
Commit
a3c79eb8
authored
Oct 25, 2015
by
Maxime Perrotin
Browse files
Remove redundant recursion
parent
e6c12e11
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/Helper.py
View file @
a3c79eb8
...
...
@@ -226,8 +226,8 @@ def flatten(process, sep=u'_'):
# Go recursively in inner composite states
inner
.
statename
=
prefix
+
inner
.
statename
update_composite_state
(
inner
,
process
)
propagate_inputs
(
inner
,
process
)
del
process
.
mapping
[
inner
.
statename
]
#
propagate_inputs(inner, process)
#
del process.mapping[inner.statename]
for
each
in
state
.
terminators
:
# Give prefix to terminators
if
each
.
label
:
...
...
@@ -272,7 +272,7 @@ def flatten(process, sep=u'_'):
for
each
in
nested_state
.
composite_states
:
# do the same recursively
propagate_inputs
(
each
,
nested_state
)
#
del nested_state.mapping[each.statename]
del
nested_state
.
mapping
[
each
.
statename
]
def
set_terminator_states
(
context
,
prefix
=
''
):
''' Associate state to terminators, needed to process properly
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment