summaryrefslogtreecommitdiff
path: root/reader.py
diff options
context:
space:
mode:
Diffstat (limited to 'reader.py')
-rw-r--r--reader.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/reader.py b/reader.py
index e234b71..63307b7 100644
--- a/reader.py
+++ b/reader.py
@@ -23,7 +23,7 @@ from __future__ import absolute_import
import codecs
import re
-from ruamel.yaml.error import YAMLError, Mark
+from ruamel.yaml.error import YAMLError, FileMark, StringMark
from ruamel.yaml.compat import text_type, binary_type, PY3
__all__ = ['Reader', 'ReaderError']
@@ -122,11 +122,10 @@ class Reader(object):
def get_mark(self):
if self.stream is None:
- return Mark(self.name, self.index, self.line, self.column,
- self.buffer, self.pointer)
+ return StringMark(self.name, self.index, self.line, self.column,
+ self.buffer, self.pointer)
else:
- return Mark(self.name, self.index, self.line, self.column,
- None, None)
+ return FileMark(self.name, self.index, self.line, self.column)
def determine_encoding(self):
while not self.eof and (self.raw_buffer is None or