summaryrefslogtreecommitdiff
path: root/scanner.py
diff options
context:
space:
mode:
Diffstat (limited to 'scanner.py')
-rw-r--r--scanner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scanner.py b/scanner.py
index 7267cea..69869a5 100644
--- a/scanner.py
+++ b/scanner.py
@@ -81,6 +81,7 @@ class Scanner(object):
self.loader._scanner = self
self.reset_scanner()
self.first_time = False
+ self.yaml_version = None
@property
def flow_level(self):
@@ -955,7 +956,8 @@ class Scanner(object):
"expected a digit or ' ', but found %r" % utf8(srp()),
self.reader.get_mark(),
)
- return (major, minor)
+ self.yaml_version = (major, minor)
+ return self.yaml_version
def scan_yaml_directive_number(self, start_mark):
# type: (Any) -> Any