diff options
author | Anthon van der Neut <anthon@mnt.org> | 2015-09-14 21:00:34 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2015-09-14 21:00:34 +0200 |
commit | 458b666f85b015b328b2d70c4072e3804dd3903a (patch) | |
tree | bfcad575211664482f3809994d4513294e8c143f /tokens.py | |
parent | 23294d8492459f0268c02191cccee955bee8c206 (diff) | |
download | ruamel.yaml-458b666f85b015b328b2d70c4072e3804dd3903a.tar.gz |
Fix Issue 11, double dump lost comments
The state 'pre_done' to keep comments from being printed twice
was not cleared and on second dump would result in non-printing
Diffstat (limited to 'tokens.py')
-rw-r--r-- | tokens.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -186,3 +186,7 @@ class CommentToken(Token): def __init__(self, value, start_mark, end_mark): Token.__init__(self, start_mark, end_mark) self.value = value + + def reset(self): + if hasattr(self, 'pre_done'): + delattr(self, 'pre_done')
\ No newline at end of file |