summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-08-09 20:03:45 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-08-09 20:03:45 +0200
commitea69043409ed4cd7fdf89044756e5af1791f2f64 (patch)
tree5983d90c5ffc298f50096c748ee65bbed12462ec /representer.py
parentfabf65a9f1227448d08e6579ac1e8268762ee9d6 (diff)
downloadruamel.yaml-ea69043409ed4cd7fdf89044756e5af1791f2f64.tar.gz
fix issue #147: not able to dump floats0.15.25
This happened when dumping without loading, e.g.: python -c "import ruamel.yaml, sys; ruamel.yaml.round_trip_dump([3.14])" When this fix solves the problem, please close this issue
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 cd4ae49..03dcbf4 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.dumper.version == (1, 1): # type: ignore
+ if self.serializer.use_version == (1, 1): # type: ignore
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: