From cd2625c1bfadf70caa28096b7908fefe41b6d43a Mon Sep 17 00:00:00 2001 From: Mark Watts Date: Mon, 27 Dec 2021 15:12:31 -0600 Subject: [PATCH] Removing reference to `file` which is not defined in Python 3 - Resolves #33 --- pyRdfa/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyRdfa/__init__.py b/pyRdfa/__init__.py index 71136bd..78e0f8a 100644 --- a/pyRdfa/__init__.py +++ b/pyRdfa/__init__.py @@ -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