Commit 19863a91 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

events names can be in the format h_ and _h_; better message error in case of empty model

parent 6b37acd2
......@@ -175,7 +175,7 @@ def get_transitions(file):
# Get the names of clocks
# Some event have many clocks (like _h_2755) for the same
# ori/ext entities, so we have to extract them
events = re.findall('(_h_[0-9\.]+)', trans.event)
events = re.findall('(_?h_[0-9\.]+)', trans.event)
for event in events:
# LOGGER.debug("NEW trans", event)
......@@ -193,6 +193,9 @@ def get_transitions(file):
LOGGER.info("{} transitions loaded".format(len(transitions)))
# Return a dict instead of defaultdict to avoid later confusions
#(masked errors) by searching a transition that was not in the model...
assert len(transitions) != 0, "No transitions found in the model !"
return dict(transitions)
......
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