summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-10-06 19:34:28 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-10-06 19:34:28 +0200
commitffaab93d8964e7fbcbc2efe3399ae128fb4c5756 (patch)
tree3f76d9322d1edfc8ca66e4bbe98cfed8c3cf7a11 /main.py
parent334c992703b2093a26b59d2cac403375b568c617 (diff)
downloadruamel.yaml-ffaab93d8964e7fbcbc2efe3399ae128fb4c5756.tar.gz
fix issue #245 regression on C parsing of explicit 1.1 source0.15.72
*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 'main.py')
-rw-r--r--main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.py b/main.py
index 2c5c7d5..140e696 100644
--- a/main.py
+++ b/main.py
@@ -394,17 +394,17 @@ class YAML(object):
# if you just initialise the CParser, to much of resolver.py
# is actually used
rslvr = self.Resolver
- if rslvr is ruamel.yaml.resolver.VersionedResolver:
- rslvr = ruamel.yaml.resolver.Resolver
+ # if rslvr is ruamel.yaml.resolver.VersionedResolver:
+ # rslvr = ruamel.yaml.resolver.Resolver
class XLoader(self.Parser, self.Constructor, rslvr): # type: ignore
- def __init__(selfx, stream, version=None, preserve_quotes=None):
+ def __init__(selfx, stream, version=self.version, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None # NOQA
CParser.__init__(selfx, stream)
selfx._parser = selfx._composer = selfx
self.Constructor.__init__(selfx, loader=selfx)
selfx.allow_duplicate_keys = self.allow_duplicate_keys
- rslvr.__init__(selfx, loadumper=selfx)
+ rslvr.__init__(selfx, version=version, loadumper=selfx)
self._stream = stream
loader = XLoader(stream)