diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-09-17 12:53:19 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-09-17 12:53:19 +0200 |
commit | 76aad7d81fff34ae456b0601292d3a638117312a (patch) | |
tree | 49492b868c5d0a7d06b6948bfea06bfac56a0642 /representer.py | |
parent | 637c6a71fd77756f7871f437ae348ff69f8e9529 (diff) | |
download | ruamel.yaml-76aad7d81fff34ae456b0601292d3a638117312a.tar.gz |
fix issue #157: CDumper not dumping floats
Diffstat (limited to 'representer.py')
-rw-r--r-- | representer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/representer.py b/representer.py index 085308c..25e53b9 100644 --- a/representer.py +++ b/representer.py @@ -309,7 +309,7 @@ class SafeRepresenter(BaseRepresenter): value = u'-.inf' else: value = to_unicode(repr(data)).lower() - if self.serializer.use_version == (1, 1): + if getattr(self.serializer, 'use_version', None) == (1, 1): if u'.' not in value and u'e' in value: # Note that in some cases `repr(data)` represents a float number # without the decimal parts. For instance: |