climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1514741 - /incubator/climate/branches/RefactorInput/ocw/dataset.py
Date Fri, 16 Aug 2013 14:48:52 GMT
Author: joyce
Date: Fri Aug 16 14:48:52 2013
New Revision: 1514741

URL: http://svn.apache.org/r1514741
Log:
CLIMATE-254 - Add end property

Modified:
    incubator/climate/branches/RefactorInput/ocw/dataset.py

Modified: incubator/climate/branches/RefactorInput/ocw/dataset.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/dataset.py?rev=1514741&r1=1514740&r2=1514741&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/dataset.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/dataset.py Fri Aug 16 14:48:52 2013
@@ -231,3 +231,14 @@ class Bounds(object):
             raise ValueError("Attempted to set start to invalid value")
 
         self._start = value
+
+    @property
+    def end(self):
+        return self._end
+
+    @end.setter
+    def end(self, value):
+        if not (type(value) is dt.datetime and value > self._start):
+            raise ValueError("Attempted to set end to invalid value")
+
+        self._end = value



Mime
View raw message