accept unicode filenames in resolver config

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1902 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-11-02 13:05:39 +00:00
parent 96722d09f1
commit 78a7af2dbf

View file

@ -306,7 +306,7 @@ class Resolver(object):
"""Process f as a file in the /etc/resolv.conf format. If f is
a string, it is used as the name of the file to open; otherwise it
is treated as the file itself."""
if isinstance(f, str) or isinstance(f, unicode):
if isinstance(f, basestring):
f = open(f, 'r')
want_close = True
else: