Skip to content

Commit

Permalink
minor code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Feb 27, 2015
1 parent 6f1a492 commit d2f952c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/lxml/isoschematron/__init__.py
Expand Up @@ -8,11 +8,6 @@


# some compat stuff, borrowed from lxml.html
try:
bytes
except NameError:
# Python < 2.6
bytes = str
try:
unicode
except NameError:
Expand Down Expand Up @@ -240,7 +235,7 @@ def __init__(self, etree=None, file=None, include=True, expand=True,
root = None
try:
if etree is not None:
if isinstance(etree, _etree._Element):
if _etree.iselement(etree):
root = etree
else:
root = etree.getroot()
Expand Down Expand Up @@ -291,7 +286,7 @@ def __call__(self, etree):
self._validation_report = result
errors = self._validation_errors(result)
if errors:
if isinstance(etree, _etree._Element):
if _etree.iselement(etree):
fname = etree.getroottree().docinfo.URL or '<file>'
else:
fname = etree.docinfo.URL or '<file>'
Expand Down

0 comments on commit d2f952c

Please sign in to comment.