--- dolfin_adjoint/timeforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/dolfin_adjoint/timeforms.py +++ b/dolfin_adjoint/timeforms.py @@ -211,7 +211,7 @@ class TimeMeasure(object): interval = slice(START_TIME,FINISH_TIME,None) if interval not in (START_TIME,FINISH_TIME) and not isinstance(interval, (slice, int, float)): - raise ValueError, "TimeMeasure can only be indexed with floats, START_TIME and FINISH_TIME." + raise(ValueError, "TimeMeasure can only be indexed with floats, START_TIME and FINISH_TIME.") self.interval = timeslice(interval)