summaryrefslogtreecommitdiff
path: root/tokens.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-09-20 16:48:10 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-09-20 16:48:10 +0200
commite1594f4f390a67f376722086ea4ac3e5583d003d (patch)
tree7b3e926d8a2e8507538832f0a216c39effc58dfb /tokens.py
parentc706e5ec84f7520b1e63110af89f441ebdbceae6 (diff)
downloadruamel.yaml-e1594f4f390a67f376722086ea4ac3e5583d003d.tar.gz
fix issue #239 dropping comments before document-end on load_all0.15.69
*When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'tokens.py')
-rw-r--r--tokens.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tokens.py b/tokens.py
index 4dd0c1d..eb03ae8 100644
--- a/tokens.py
+++ b/tokens.py
@@ -69,7 +69,7 @@ class Token(object):
if c is None:
return
# don't push beyond last element
- if isinstance(target, StreamEndToken):
+ if isinstance(target, (StreamEndToken, DocumentStartToken)):
return
delattr(self, '_comment')
tc = target.comment