File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -125,19 +125,21 @@ def action(
125125 self ,
126126 actionDescription : WMS_WebControl_pro_API_actionDescription ,
127127 actionType : WMS_WebControl_pro_API_actionType = None ,
128+ warnMissing = True ,
128129 ) -> Action :
129130 for action in self ._actions .values ():
130131 if action .actionDescription == actionDescription and (
131132 actionType is None or actionType == action .actionType
132133 ):
133134 return action
134- _LOGGER .warning (
135- "Failed to get action with description %s and type %s in %s (%s)" ,
136- actionDescription ,
137- actionType ,
138- self ,
139- self ._id ,
140- )
135+ if warnMissing :
136+ _LOGGER .warning (
137+ "Failed to get action with description %s and type %s in %s (%s)" ,
138+ actionDescription .name ,
139+ actionType .name if actionType else None ,
140+ self ,
141+ self ._id ,
142+ )
141143 return None
142144
143145 def diag (self ) -> dict :
You can’t perform that action at this time.
0 commit comments