Skip to content

Commit

Permalink
Ensure original is_string logic preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam-Deacon committed Mar 8, 2020
1 parent 6ea4ec2 commit 6c4e502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion untangle.py
Expand Up @@ -197,7 +197,7 @@ def parse(filename, **parser_features):
parse_directly = is_string(filename) and (os.path.exists(filename) or
is_url(filename))
except ValueError: # Can only occur when is_string(filename) == True
parse_directly = is_url(filename)
parse_directly = is_string(filename) and is_url(filename)
finally:
parse_directly = parse_directly or hasattr(filename, "read")
parser.parse(filename if parse_directly else StringIO(filename))
Expand Down

0 comments on commit 6c4e502

Please sign in to comment.