@@ -140,8 +140,7 @@ def _ask_with_fallback(self, question: str, opt: str = None):
140140 logger .warning ('OMTypedParser error: %s' , ex .msg )
141141 result = self .ask (question = question , opt = opt , parsed = False )
142142 try :
143- answer = om_parser_basic (result )
144- return answer [2 :]
143+ return om_parser_basic (result )
145144 except (TypeError , UnboundLocalError ) as ex :
146145 logger .warning ('OMParser error: %s' , ex )
147146 return result
@@ -254,15 +253,17 @@ def getComponentModifierNames(self, className, componentName):
254253 return self .ask ('getComponentModifierNames' , f'{ className } , { componentName } ' )
255254
256255 def getComponentModifierValue (self , className , componentName ):
257- return self ._ask_with_fallback (question = 'getComponentModifierValue' ,
258- opt = f'{ className } , { componentName } ' )
256+ result = self ._ask_with_fallback (question = 'getComponentModifierValue' ,
257+ opt = f'{ className } , { componentName } ' )
258+ return result [2 :]
259259
260260 def getExtendsModifierNames (self , className , componentName ):
261261 return self .ask ('getExtendsModifierNames' , f'{ className } , { componentName } ' )
262262
263263 def getExtendsModifierValue (self , className , extendsName , modifierName ):
264- return self ._ask_with_fallback (question = 'getExtendsModifierValue' ,
265- opt = f'{ className } , { extendsName } , { modifierName } ' )
264+ result = self ._ask_with_fallback (question = 'getExtendsModifierValue' ,
265+ opt = f'{ className } , { extendsName } , { modifierName } ' )
266+ return result [2 :]
266267
267268 def getNthComponentModification (self , className , comp_id ):
268269 # FIXME: OMPython exception Results KeyError exception
0 commit comments