* Changing all isinstance(STUFF, str)' to isinstance(STUFF, basestring)'

for future-proofing this code.
This commit is contained in:
Wirawan Purwanto
2012-04-13 17:10:32 -04:00
parent 6656d3d5e3
commit 606214eb66
7 changed files with 9 additions and 9 deletions

View File

@@ -86,7 +86,7 @@ def glob_files(filespec):
When globbing is done, the result is sorted for predictability.'''
if getattr(filespec, "__iter__", False):
return filespec # no re-sorting
elif isinstance(filespec, str):
elif isinstance(filespec, basestring):
return sorted(glob.glob(filespec))
else:
raise ValueError, "Don't know how to glob for an object of " + type(filespec)