|
17 | 17 | from absbox.local.util import mkTag,mapValsBy \ |
18 | 18 | , _read_cf, _read_asset_pricing, mergeStrWithDict \ |
19 | 19 | , earlyReturnNone, searchByFst, filter_by_tags \ |
20 | | - , enumVals, lmap, inferPoolTypeFromAst, getValWithKs, mapNone |
| 20 | + , enumVals, lmap, inferPoolTypeFromAst, getValWithKs, mapNone\ |
| 21 | + , readAeson |
21 | 22 | from absbox.local.component import mkPool, mkAssumpType, mkNonPerfAssumps, mkLiqMethod \ |
22 | 23 | , mkAssetUnion, mkRateAssumption, mkDatePattern, mkPoolType |
23 | 24 |
|
@@ -718,10 +719,11 @@ def runFirstLoss(self, deal, bName, poolAssump=None, runAssump=[], read=True, sh |
718 | 719 | if result is None or 'error' in result or 'Left' in result: |
719 | 720 | leftVal = result.get("Left","") |
720 | 721 | raise AbsboxError(f"❌{MsgColor.Error.value}Failed to get response from run: {leftVal}") |
721 | | - # rawWarnMsg = map( lambda x:f"{MsgColor.Warning.value}{x['contents']}", filter_by_tags(result[RunResp.LogResp.value], enumVals(ValidationMsg))) |
722 | | - # if rawWarnMsg and showWarning: |
723 | | - # console.print("Warning Message from server:\n"+"\n".join(list(rawWarnMsg))) |
724 | | - return result['Right'] |
| 722 | + |
| 723 | + if read: |
| 724 | + return readAeson(result['Right']) |
| 725 | + else: |
| 726 | + result['Right'] |
725 | 727 |
|
726 | 728 | def runAsset(self, date, _assets, poolAssump=None, rateAssump=None |
727 | 729 | , pricing=None, read=True, debug=False) -> tuple: |
|
0 commit comments