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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jul 14 07:06:16 PDT 2017


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/a3626fc86f17/
Changeset:   a3626fc86f17
User:        nmearl
Date:        2017-07-12 17:08:33+00:00
Summary:     Decode units given as bytes object
Affected #:  1 file

diff -r d7bc05ca16057f120acd5d043f90b6a8a32a2de5 -r a3626fc86f17bacccb9c7d92535589a52c7ab5bd yt/fields/derived_field.py
--- a/yt/fields/derived_field.py
+++ b/yt/fields/derived_field.py
@@ -144,6 +144,8 @@
                 self.units = units
         elif isinstance(units, Unit):
             self.units = str(units)
+        elif isinstance(units, bytes):
+            self.units = units.decode("utf-8")
         else:
             raise FieldUnitsError("Cannot handle units '%s' (type %s)." \
                                   "Please provide a string or Unit " \


https://bitbucket.org/yt_analysis/yt/commits/1d289fca31c3/
Changeset:   1d289fca31c3
User:        ngoldbaum
Date:        2017-07-14 14:06:03+00:00
Summary:     Merge pull request #1491 from nmearl/master

Decode units given as bytes object
Affected #:  1 file

diff -r 97d66bcd02227747896348ca0cfe764867499370 -r 1d289fca31c306ae5f0bd3cefb5ccb26d0504092 yt/fields/derived_field.py
--- a/yt/fields/derived_field.py
+++ b/yt/fields/derived_field.py
@@ -145,6 +145,8 @@
                 self.units = units
         elif isinstance(units, Unit):
             self.units = str(units)
+        elif isinstance(units, bytes):
+            self.units = units.decode("utf-8")
         else:
             raise FieldUnitsError("Cannot handle units '%s' (type %s)." \
                                   "Please provide a string or Unit " \

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