[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Apr 18 13:26:15 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/84fcadda5b5e/
Changeset:   84fcadda5b5e
Branch:      yt
User:        chummels
Date:        2014-04-18 06:25:01
Summary:     Making a better error message when TimeSeries fails for not being in the right directory as the data outputs.
Affected #:  1 file

diff -r 6c43763f6c838bdd6e5859d13c56e33963a224ba -r 84fcadda5b5ebbbfdea5c0eb88909926259b41df yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -114,7 +114,11 @@
                 return self.get_range(key.start, key.stop)
             # This will return a sliced up object!
             return TimeSeriesData(self._pre_outputs[key], self.parallel)
-        o = self._pre_outputs[key]
+        try: 
+            o = self._pre_outputs[key]
+        except IndexError:
+            raise InvalidSimulationTimeSeries("Your TimeSeries is empty.  Confirm you are running from the simulation source directory.")
+
         if isinstance(o, types.StringTypes):
             o = load(o,**self.kwargs)
         return o


https://bitbucket.org/yt_analysis/yt/commits/1a67d558b51c/
Changeset:   1a67d558b51c
Branch:      yt
User:        chummels
Date:        2014-04-18 22:22:39
Summary:     Modifying exception error message.
Affected #:  1 file

diff -r 84fcadda5b5ebbbfdea5c0eb88909926259b41df -r 1a67d558b51cf89b66417704c5bcd9533810a023 yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -117,7 +117,8 @@
         try: 
             o = self._pre_outputs[key]
         except IndexError:
-            raise InvalidSimulationTimeSeries("Your TimeSeries is empty.  Confirm you are running from the simulation source directory.")
+            raise InvalidSimulationTimeSeries("Your TimeSeries is empty. \n" + 
+                "Confirm you are running from the simulation source directory.")
 
         if isinstance(o, types.StringTypes):
             o = load(o,**self.kwargs)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list