Skip to content

Commit

Permalink
Merge pull request #346 from tmolteno/master
Browse files Browse the repository at this point in the history
Update the casa backend to split the wrapper. Issue #121, #122
  • Loading branch information
o-smirnov authored Nov 10, 2024
2 parents ace73a7 + 230655c commit 6c5de8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stimela/backends/flavours/casa.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def finalize(self, cab: Cab):
super().finalize(cab)

# catch CASA error messages, except the MeasTable::dUTC complaints which are all-pervasive
err_patt = re.compile("(?P<content>(\tSEVERE\s+(?!MeasTable::dUTC)|ABORTING|\*\*\* Error \*\*\*)(.*))$")
rex = "(?P<content>(\tSEVERE\\s+(?!([a-z]+::)?MeasTable::dUTC)|ABORTING|\\*\\*\\* Error \\*\\*\\*)(.*))$"
err_patt = re.compile(rex)
cab._wranglers.append((
err_patt, [
wranglers.DeclareError(err_patt, "ERROR", message="CASA error: {content}" )
Expand Down Expand Up @@ -64,7 +65,7 @@ def get_arguments(self, cab: Cab, params: Dict[str, Any], subst: Dict[str, Any],
wrapper = self.wrapper if self.wrapper is not None else casa_config.get('wrapper', 'xvfb-run -a')
if wrapper:
try:
wrapper = [context.evaluate(wrapper, location=["wrapper"])]
wrapper = context.evaluate(wrapper, location=["wrapper"]).split()
except Exception as exc:
raise SubstitutionError(f"error substituting wrapper '{wrapper}'", exc)
else:
Expand Down

0 comments on commit 6c5de8e

Please sign in to comment.