Remove basestring from the setup package

This commit is contained in:
Kovid Goyal 2018-09-10 20:58:01 +05:30
parent f39f3951f4
commit e125996ee6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -32,9 +32,9 @@ _cache_dir_built = False
def newer(targets, sources):
if isinstance(targets, basestring):
if hasattr(targets, 'rjust'):
targets = [targets]
if isinstance(sources, basestring):
if hasattr(sources, 'rjust'):
sources = [sources]
for f in targets:
if not os.path.exists(f):

View File

@ -73,7 +73,7 @@ def expand_file_list(items, is_paths=True):
for item in items:
if item.startswith('!'):
item = lazy_load(item)
if isinstance(item, basestring):
if hasattr(item, 'rjust'):
item = [item]
ans.extend(expand_file_list(item, is_paths=is_paths))
else: