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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Oct 12 09:59:58 PDT 2016


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/e008467d0321/
Changeset:   e008467d0321
Branch:      yt
User:        hyschive
Date:        2016-10-04 22:37:23+00:00
Summary:     Bugfix: do not access unit in _override_code_units when it is not set yet
Affected #:  1 file

diff -r aae37ab0285f6f641eb0b435c83f29bb74fc2f66 -r e008467d0321662a5ecf837b95f4e221bfbbab25 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -948,8 +948,12 @@
                 elif not isinstance(val, tuple):
                     val = (val, cgs)
                 u = getattr(self, "%s_unit" % unit, None)
-                mylog.info("Overriding %s_unit: %g -> %g %s.",
-                           unit, u, val[0], val[1])
+                if u is None:
+                    mylog.info("Overriding %s_unit: %g %s.",
+                               unit, val[0], val[1])
+                else:
+                    mylog.info("Overriding %s_unit: %g -> %g %s.",
+                               unit, u, val[0], val[1])
                 setattr(self, "%s_unit" % unit, self.quan(val[0], val[1]))
 
     _arr = None


https://bitbucket.org/yt_analysis/yt/commits/80ccf258ab27/
Changeset:   80ccf258ab27
Branch:      yt
User:        hyschive
Date:        2016-10-04 22:42:29+00:00
Summary:     Assuming u is always None
Affected #:  1 file

diff -r e008467d0321662a5ecf837b95f4e221bfbbab25 -r 80ccf258ab27134eec39bb17dd46ef96991da107 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -947,13 +947,7 @@
                     val = (val.v, str(val.units))
                 elif not isinstance(val, tuple):
                     val = (val, cgs)
-                u = getattr(self, "%s_unit" % unit, None)
-                if u is None:
-                    mylog.info("Overriding %s_unit: %g %s.",
-                               unit, val[0], val[1])
-                else:
-                    mylog.info("Overriding %s_unit: %g -> %g %s.",
-                               unit, u, val[0], val[1])
+                mylog.info("Overriding %s_unit: %g %s.", unit, val[0], val[1])
                 setattr(self, "%s_unit" % unit, self.quan(val[0], val[1]))
 
     _arr = None


https://bitbucket.org/yt_analysis/yt/commits/fe99e1de08ba/
Changeset:   fe99e1de08ba
Branch:      yt
User:        ngoldbaum
Date:        2016-10-12 16:59:29+00:00
Summary:     Merged in hyschive/yt-fork (pull request #2407)

Bug fix: do not access unit in _override_code_units when it is not set yet
Affected #:  1 file

diff -r 77f2798ee447ff044484bb2a6604e022c0d47752 -r fe99e1de08bab01d351c03cd3d2439f2612dbaf8 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -947,9 +947,7 @@
                     val = (val.v, str(val.units))
                 elif not isinstance(val, tuple):
                     val = (val, cgs)
-                u = getattr(self, "%s_unit" % unit, None)
-                mylog.info("Overriding %s_unit: %g -> %g %s.",
-                           unit, u, val[0], val[1])
+                mylog.info("Overriding %s_unit: %g %s.", unit, val[0], val[1])
                 setattr(self, "%s_unit" % unit, self.quan(val[0], val[1]))
 
     _arr = 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