summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-09-17 12:53:19 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-09-17 12:53:19 +0200
commit76aad7d81fff34ae456b0601292d3a638117312a (patch)
tree49492b868c5d0a7d06b6948bfea06bfac56a0642 /representer.py
parent637c6a71fd77756f7871f437ae348ff69f8e9529 (diff)
downloadruamel.yaml-76aad7d81fff34ae456b0601292d3a638117312a.tar.gz
fix issue #157: CDumper not dumping floats
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py2
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: