[Yt-svn] yt: Check if temp_data isn't empty before accumulating.

hg at spacepope.org hg at spacepope.org
Mon Mar 29 10:05:09 PDT 2010


hg Repository: yt
details:   yt/rev/bef3ec409ee8
changeset: 1495:bef3ec409ee8
user:      John Wise <jwise at astro.princeton.edu>
date:
Mon Mar 29 13:05:05 2010 -0400
description:
Check if temp_data isn't empty before accumulating.

diffstat:

 yt/lagos/BaseDataTypes.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r c248cd4313a8 -r bef3ec409ee8 yt/lagos/BaseDataTypes.py
--- a/yt/lagos/BaseDataTypes.py	Sun Mar 28 23:31:52 2010 -0700
+++ b/yt/lagos/BaseDataTypes.py	Mon Mar 29 13:05:05 2010 -0400
@@ -593,7 +593,8 @@
             # Now the next field can use this field
             self[field] = temp_data[field] 
         # We finalize
-        temp_data = self._mpi_catdict(temp_data)
+        if temp_data != {}:
+            temp_data = self._mpi_catdict(temp_data)
         # And set, for the next group
         for field in temp_data.keys():
             self[field] = temp_data[field]



More information about the yt-svn mailing list