[yt-svn] commit/yt: brittonsmith: Added checking for empty profile files to fix issues where previous

Bitbucket commits-noreply at bitbucket.org
Wed Jun 6 13:17:53 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/c18d5d3b7faf/
changeset:   c18d5d3b7faf
branch:      yt
user:        brittonsmith
date:        2012-06-06 22:17:14
summary:     Added checking for empty profile files to fix issues where previous
runs of the halo profiler get killed (by job queues) and leave
behind empty files.
affected #:  1 file

diff -r 72eca81466a4ac2e28332fc34ef9d970758f2df4 -r c18d5d3b7fafa3a64cbb65d650ac9fed2e751497 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -1011,6 +1011,9 @@
         lines = f.readlines()
         f.close()
 
+        if not lines:
+            return None
+
         # Get fields from header.
         header = lines.pop(0)
         header = header.strip()

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