Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing reference to file which is not defined in Python 3 #36

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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