Skip to content

Commit 2415055

Browse files
committed
[parser] Update invalid odML format version text
1 parent 64a91d5 commit 2415055

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

odml/tools/odmlparser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def to_odml(self):
190190
if 'odml-version' not in self.parsed_doc:
191191
raise ParserException("Invalid odML document: Could not find odml-version.")
192192
elif self.parsed_doc.get('odml-version') != FORMAT_VERSION:
193-
msg = ("Invalid odML document format version '%s'. "
194-
"Supported versions: '%s'."
193+
msg = ("Cannot read file: invalid odML document format version '%s'. \n"
194+
"This package supports odML format versions: '%s'."
195195
% (self.parsed_doc.get('odml-version'), FORMAT_VERSION))
196196
raise ParserException(msg)
197197

odml/tools/xmlparser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def _handle_version(root):
164164
raise ParserException("Could not find format version attribute "
165165
"in odML start tag.\n")
166166
elif root.attrib['version'] != FORMAT_VERSION:
167-
msg = ("Invalid odML document format version '%s'. "
168-
"Supported versions: '%s'."
167+
msg = ("Cannot read file: invalid odML document format version '%s'. \n"
168+
"This package supports odML format versions: '%s'."
169169
% (root.attrib['version'], FORMAT_VERSION))
170170
raise ParserException(msg)
171171

0 commit comments

Comments
 (0)