[yt-svn] commit/yt: ngoldbaum: Need to check if units is not None before using it like a dict in create_profile.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Jul 16 17:45:30 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/2bccbc8de4e2/
Changeset: 2bccbc8de4e2
Branch: yt-3.0
User: ngoldbaum
Date: 2014-07-17 02:45:08
Summary: Need to check if units is not None before using it like a dict in create_profile.
Affected #: 1 file
diff -r fe6b0d8e6f9c4aaefccaa556dab34b11f8a1fd33 -r 2bccbc8de4e2b93aed82fff99f0dafd9308e1691 yt/data_objects/profiles.py
--- a/yt/data_objects/profiles.py
+++ b/yt/data_objects/profiles.py
@@ -1279,7 +1279,7 @@
field_ex = list(extrema[bin_field[-1]])
except KeyError:
field_ex = list(extrema[bin_field])
- if bin_field in units:
+ if units is not None and bin_field in units:
fe = data_source.pf.arr(field_ex, units[bin_field])
fe.convert_to_units(bf_units)
field_ex = [fe[0].v, fe[1].v]
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