[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Apr 4 10:33:16 PDT 2014
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/bd42a5cb78f8/
Changeset: bd42a5cb78f8
Branch: yt-3.0
User: MatthewTurk
Date: 2014-04-04 18:57:59
Summary: Use a guard in Dataset to check we are not initializing twice.
Fixes #824.
The problem arose because of partial second-initialization when a parameter
file still existed in memory during iteration over a time series. This
addresses it by refusing to initialize twice.
Affected #: 1 file
diff -r 1724ae2cae8f5a43591ad73eae457cc7cb4b759b -r bd42a5cb78f82d474a340f9a17a5d45edc61fead yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -143,6 +143,10 @@
Base class for generating new output types. Principally consists of
a *filename* and a *dataset_type* which will be passed on to children.
"""
+ # We return early and do NOT initialize a second time if this file has
+ # already been initialized.
+ if self.known_filters is not None:
+ return
self.dataset_type = dataset_type
self.file_style = file_style
self.conversion_factors = {}
https://bitbucket.org/yt_analysis/yt/commits/918a6162882f/
Changeset: 918a6162882f
Branch: yt-3.0
User: jzuhone
Date: 2014-04-04 19:33:09
Summary: Merged in MatthewTurk/yt/yt-3.0 (pull request #796)
Use a guard in Dataset to check we are not initializing twice.
Affected #: 1 file
diff -r 36f6b4794d39f28e68f02e2f9ce80bd516dd9f10 -r 918a6162882ffc2e6e16f8493e1d098119d9ed27 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -143,6 +143,10 @@
Base class for generating new output types. Principally consists of
a *filename* and a *dataset_type* which will be passed on to children.
"""
+ # We return early and do NOT initialize a second time if this file has
+ # already been initialized.
+ if self.known_filters is not None:
+ return
self.dataset_type = dataset_type
self.file_style = file_style
self.conversion_factors = {}
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