Skip to content

Commit e67b260

Browse files
committed
Restore removed error check in action.py
1 parent cfbdf4f commit e67b260

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

famodel/irma/action.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def checkAsset(self, role_name, asset):
206206
a specified role in this action.
207207
'''
208208

209+
# Make sure role_name is valid for this action
210+
if not role_name in self.assets.keys():
211+
raise Exception(f"The specified role name '{role_name}' is not a named asset role in this action.")
212+
209213
for capability in self.requirements[role_name].keys():
210214

211215
if capability in asset['capabilities'].keys(): # check capability

0 commit comments

Comments
 (0)