[Scipy-svn] r3015 - trunk/Lib/sandbox/timeseries
scipy-svn@scip...
scipy-svn@scip...
Thu May 17 10:36:03 CDT 2007
Author: mattknox_ca
Date: 2007-05-17 10:35:58 -0500 (Thu, 17 May 2007)
New Revision: 3015
Modified:
trunk/Lib/sandbox/timeseries/tdates.py
trunk/Lib/sandbox/timeseries/tseries.py
Log:
fixed exception classes so the error string outputs properly
Modified: trunk/Lib/sandbox/timeseries/tdates.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tdates.py 2007-05-17 07:37:27 UTC (rev 3014)
+++ trunk/Lib/sandbox/timeseries/tdates.py 2007-05-17 15:35:58 UTC (rev 3015)
@@ -54,14 +54,13 @@
#---- --- Date Exceptions ---
#####---------------------------------------------------------------------------
class DateError(Exception):
- """Defines a generic DateArrayError."""
- def __init__ (self, args=None):
- "Create an exception"
- Exception.__init__(self)
- self.args = args
+ "Defines a generic DateArrayError."
+ def __init__ (self, value=None):
+ "Creates an exception."
+ self.value = value
def __str__(self):
- "Calculate the string representation"
- return str(self.args)
+ "Calculates the string representation."
+ return str(self.value)
__repr__ = __str__
class InsufficientDateError(DateError):
Modified: trunk/Lib/sandbox/timeseries/tseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tseries.py 2007-05-17 07:37:27 UTC (rev 3014)
+++ trunk/Lib/sandbox/timeseries/tseries.py 2007-05-17 15:35:58 UTC (rev 3015)
@@ -99,13 +99,12 @@
#### --------------------------------------------------------------------------
class TimeSeriesError(Exception):
"Class for TS related errors."
- def __init__ (self, args=None):
+ def __init__ (self, value=None):
"Creates an exception."
- Exception.__init__(self)
- self.args = args
+ self.value = value
def __str__(self):
"Calculates the string representation."
- return str(self.args)
+ return str(self.value)
__repr__ = __str__
class TimeSeriesCompatibilityError(TimeSeriesError):
More information about the Scipy-svn
mailing list