fix unicode error

This commit is contained in:
Lucas Duailibe 2013-03-10 18:12:16 -03:00
parent 01a449ffa6
commit f6c3e4652c

View file

@ -643,9 +643,11 @@ def import_files(lib, paths, query):
for path in paths:
fullpath = syspath(normpath(path))
if not config['import']['singletons'] and not os.path.isdir(fullpath):
raise ui.UserError('not a directory: ' + path)
raise ui.UserError(u'not a directory: {0}'.format(
displayable_path(path)))
elif config['import']['singletons'] and not os.path.exists(fullpath):
raise ui.UserError('no such file: ' + path)
raise ui.UserError(u'no such file: {0}'.format(
displayable_path(path)))
# Check parameter consistency.
if config['import']['quiet'] and config['import']['timid']: