Skip to content

Commit

Permalink
Possible fix for issue #73
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Worrell committed Aug 10, 2015
1 parent 52344be commit 86e4b75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdv/validators/xml_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def line(self):

try:
# libxml2 schema validation errors are tokenized by colons
tokenized = self.message.split(":")
return int(tokenized[1])
tokenized = self.message.split(":ERROR:", 1)
tokenized = tokenized[0].split(":")
return int(tokenized[-2])
except (IndexError, TypeError, ValueError):
return None

Expand Down

0 comments on commit 86e4b75

Please sign in to comment.