diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-06-04 14:27:02 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-06-04 14:27:02 +0200 |
commit | a0ff58af5242fddc39236168b18aafb7c8b324da (patch) | |
tree | b7ba0da53b720dde7be6e3b32ad927456c6f5dcf /scanner.py | |
parent | 6ba66a44af41d072f5ceddfcdf2c21611c2a7cd0 (diff) | |
download | ruamel.yaml-a0ff58af5242fddc39236168b18aafb7c8b324da.tar.gz |
initial version with YAML class0.15.0
Some new tests are still required
Diffstat (limited to 'scanner.py')
-rw-r--r-- | scanner.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -72,7 +72,7 @@ class Scanner(object): # self.forward(l=1) # read the next l characters and move the pointer self.loader = loader - if self.loader is not None: + if self.loader is not None and getattr(self.loader, '_scanner', None) is None: self.loader._scanner = self # Had we reached the end of the stream? @@ -130,6 +130,8 @@ class Scanner(object): @property def reader(self): # type: () -> Any + if hasattr(self.loader, 'typ'): + self.loader.reader return self.loader._reader # Public methods. |