[Yt-svn] commit/yt: MatthewTurk: Adding a silent failure for ramses importing.
Bitbucket
commits-noreply at bitbucket.org
Wed Jun 8 10:05:40 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/716698ff4046/
changeset: 716698ff4046
branch: yt
user: MatthewTurk
date: 2011-06-08 19:05:22
summary: Adding a silent failure for ramses importing.
affected #: 1 file (124 bytes)
--- a/yt/frontends/ramses/data_structures.py Wed Jun 08 11:55:03 2011 -0400
+++ b/yt/frontends/ramses/data_structures.py Wed Jun 08 13:05:22 2011 -0400
@@ -34,7 +34,10 @@
AMRHierarchy
from yt.data_objects.static_output import \
StaticOutput
-import _ramses_reader
+try:
+ import _ramses_reader
+except ImportError:
+ _ramses_reader = None
from .fields import RAMSESFieldContainer
from yt.utilities.definitions import \
mpc_conversion
@@ -269,6 +272,8 @@
def __init__(self, filename, data_style='ramses',
storage_filename = None):
+ if _ramses_reader is None:
+ import _ramses_reader
StaticOutput.__init__(self, filename, data_style)
self.storage_filename = storage_filename
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