Skip to content

Commit 439759f

Browse files
committed
Fix codacy issues
1 parent e65ad89 commit 439759f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

esmvalcore/preprocessor/_derive/siextent.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import iris
66
from iris import Constraint
77

8-
from ._baseclass import DerivedVariableBase
98
from esmvalcore.exceptions import RecipeError
9+
from ._baseclass import DerivedVariableBase
1010

1111
logger = logging.getLogger(__name__)
1212

@@ -52,10 +52,10 @@ def calculate(cubes):
5252
except iris.exceptions.ConstraintMismatchError:
5353
try:
5454
sic = cubes.extract_cube(Constraint(name='siconca'))
55-
except iris.exceptions.ConstraintMismatchError:
55+
except iris.exceptions.ConstraintMismatchError as exc:
5656
raise RecipeError(
5757
'Derivation of siextent failed due to missing variables '
58-
'sic and siconca.')
58+
'sic and siconca.') from exc
5959

6060
ones = da.ones_like(sic)
6161
siextent_data = da.ma.masked_where(sic.lazy_data() < 15., ones)

0 commit comments

Comments
 (0)