[yt-svn] commit/yt: xarthisius: Merged in ngoldbaum/yt (pull request #2033)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 9 09:07:11 PST 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/fe826d7cd6ba/
Changeset: fe826d7cd6ba
Branch: yt
User: xarthisius
Date: 2016-03-09 17:07:00+00:00
Summary: Merged in ngoldbaum/yt (pull request #2033)
Fail early when the Camera is initialized without a scene object
Affected #: 1 file
diff -r 874b330c7acc67a67f7ab62d52ca80fa61f98bfb -r fe826d7cd6ba606461cf25fc50404f1d3836dbf9 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -120,6 +120,12 @@
def __init__(self, scene, data_source=None, lens_type='plane-parallel',
auto=False):
+ # import this here to avoid an import cycle
+ from .scene import Scene
+ if not isinstance(scene, Scene):
+ raise RuntimeError(
+ 'The first argument passed to the Camera initializer is a '
+ '%s object, expected a %s object' % (type(scene), Scene))
self.scene = scene
self.lens = None
self.north_vector = None
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