summaryrefslogtreecommitdiff
path: root/reader.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-06-08 18:40:16 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-06-08 18:40:16 +0200
commit8ffc3104dae2dc704a632a99b29ec640d9b76e9c (patch)
tree27eaf8d4dcefe970726be865f6503889efb58a91 /reader.py
parent9de6192acb16bedcee010562f97aad8f4e6094d5 (diff)
downloadruamel.yaml-8ffc3104dae2dc704a632a99b29ec640d9b76e9c.tar.gz
fix reset of scanner, reader, parser on multi-load0.15.5
Diffstat (limited to 'reader.py')
-rw-r--r--reader.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/reader.py b/reader.py
index 210470c..b28befc 100644
--- a/reader.py
+++ b/reader.py
@@ -76,6 +76,10 @@ class Reader(object):
self.loader = loader
if self.loader is not None and getattr(self.loader, '_reader', None) is None:
self.loader._reader = self
+ self.reset_reader()
+ self.stream = stream # type: Any # as .read is called
+
+ def reset_reader(self):
self.name = None # type: Any
self.stream_pointer = 0
self.eof = True
@@ -87,7 +91,6 @@ class Reader(object):
self.index = 0
self.line = 0
self.column = 0
- self.stream = stream # type: Any # as .read is called
@property
def stream(self):