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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 2 11:04:18 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/79c22a99fd05/
Changeset:   79c22a99fd05
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-04-02 17:02:12
Summary:     Fixing an importerror in the tests if astropy is not installed.
Affected #:  1 file

diff -r 2ef55a7a3a8b8ba66fd8f68c31b744b91ff361ee -r 79c22a99fd05d156314ad78306793a2ae1f3aab4 yt/frontends/fits/data_structures.py
--- a/yt/frontends/fits/data_structures.py
+++ b/yt/frontends/fits/data_structures.py
@@ -39,8 +39,11 @@
     @property
     def pyfits(self):
         if self._pyfits is None:
-            import astropy.io.fits as pyfits
-            self.log
+            try:
+                import astropy.io.fits as pyfits
+                self.log
+            except ImportError:
+                pyfits = None
             self._pyfits = pyfits
         return self._pyfits
 
@@ -48,8 +51,11 @@
     @property
     def pywcs(self):
         if self._pywcs is None:
-            import astropy.wcs as pywcs
-            self.log
+            try:
+                import astropy.wcs as pywcs
+                self.log
+            except ImportError:
+                pywcs = None
             self._pywcs = pywcs
         return self._pywcs
 
@@ -57,9 +63,12 @@
     @property
     def log(self):
         if self._log is None:
-            from astropy import log
-            if log.exception_logging_enabled():
-                log.disable_exception_logging()
+            try:
+                from astropy import log
+                if log.exception_logging_enabled():
+                    log.disable_exception_logging()
+            except ImportError:
+                log = None
             self._log = log
         return self._log
 


https://bitbucket.org/yt_analysis/yt/commits/03495f8bb68d/
Changeset:   03495f8bb68d
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-04-02 20:04:12
Summary:     Merged in MatthewTurk/yt/yt-3.0 (pull request #786)

Fixing an importerror in the tests if astropy is not installed.
Affected #:  1 file

diff -r 9f6ad437aa6f9b677dd83ad1979d49edb923c69c -r 03495f8bb68d7f73a5318948eb35c2798042db38 yt/frontends/fits/data_structures.py
--- a/yt/frontends/fits/data_structures.py
+++ b/yt/frontends/fits/data_structures.py
@@ -39,8 +39,11 @@
     @property
     def pyfits(self):
         if self._pyfits is None:
-            import astropy.io.fits as pyfits
-            self.log
+            try:
+                import astropy.io.fits as pyfits
+                self.log
+            except ImportError:
+                pyfits = None
             self._pyfits = pyfits
         return self._pyfits
 
@@ -48,8 +51,11 @@
     @property
     def pywcs(self):
         if self._pywcs is None:
-            import astropy.wcs as pywcs
-            self.log
+            try:
+                import astropy.wcs as pywcs
+                self.log
+            except ImportError:
+                pywcs = None
             self._pywcs = pywcs
         return self._pywcs
 
@@ -57,9 +63,12 @@
     @property
     def log(self):
         if self._log is None:
-            from astropy import log
-            if log.exception_logging_enabled():
-                log.disable_exception_logging()
+            try:
+                from astropy import log
+                if log.exception_logging_enabled():
+                    log.disable_exception_logging()
+            except ImportError:
+                log = None
             self._log = log
         return self._log

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