Skip to content

Commit

Permalink
Removing reference to file which is not defined in Python 3
Browse files Browse the repository at this point in the history
- Resolves RDFLib#33
  • Loading branch information
mwatts15 committed Dec 27, 2021
1 parent 0832982 commit cd2625c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyRdfa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@ def copyErrors(tog, options) :

else :
from .host import adjust_xhtml_and_version
if isinstance(input, StringIO) or isinstance(input, file):
parse = xml.dom.minidom.parse
else:
if isinstance(input, str):
parse = xml.dom.minidom.parseString
else:
parse = xml.dom.minidom.parse
dom = parse(input)
(adjusted_host_language, version) = adjust_xhtml_and_version(dom, self.options.host_language, self.rdfa_version)
self.options.host_language = adjusted_host_language
Expand Down

0 comments on commit cd2625c

Please sign in to comment.