From cf914ab2ee6b2825e8c80f2b07a76dd4c55da46f Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Sat, 4 Jan 2020 16:05:54 -0500 Subject: [PATCH] Set ValueError .args attribute, for Python 2.7 This should hopefully fix up our CI results. --- jplephem/exceptions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jplephem/exceptions.py b/jplephem/exceptions.py index fc19e85..083ba9d 100644 --- a/jplephem/exceptions.py +++ b/jplephem/exceptions.py @@ -4,14 +4,13 @@ class OutOfRangeError(ValueError): """One or more time values given were out of range for the ephemeris. This exception is thrown if any input times are out of the range of - times supported by an ephemeris. It has two extra attributes: + times supported by an ephemeris. It has an extra attribute: - - `message`: a string explaining what happened - `out_of_range_times`: if the input `tdb` of times is an array, this provides an array of booleans of the same length where `True` means the corresponding date is out of range. """ def __init__(self, message, out_of_range_times): - self.message = message + self.args = message, self.out_of_range_times = out_of_range_times