def opt_exclude(self, pattern):
"""Ignore files matching a glob pattern. You may give multiple
'--exclude' options."""
- g = pattern.strip()
+ g = argv_to_unicode(pattern).strip()
if g:
exclude = self['exclude']
exclude.add(g)
def opt_exclude_from(self, filepath):
"""Ignore file matching glob patterns listed in file, one per
- line."""
+ line. The file is assumed to be in the argv encoding."""
try:
exclude_file = file(filepath)
except:
children = []
for child in self.options.filter_listdir(children):
+ assert isinstance(child, unicode), child
childpath = os.path.join(localpath, child)
- child = unicode(child)
# note: symlinks to directories are both islink() and isdir()
if os.path.isdir(childpath) and not os.path.islink(childpath):
metadata = get_local_metadata(childpath)