comparison gcp @ 11:c065a70c3e7b

fixed encoding issue for a warning
author Goffi <goffi@goffi.org>
date Tue, 28 Sep 2010 14:10:37 +0800
parents 00b27fce4677
children bbe09d5791dd
comparison
equal deleted inserted replaced
10:00b27fce4677 11:c065a70c3e7b
237 error (_("Invalid dest_path: %s"),e) 237 error (_("Invalid dest_path: %s"),e)
238 238
239 for path in args: 239 for path in args:
240 abspath = os.path.normpath(os.path.join(os.path.expanduser(source_path), path)) 240 abspath = os.path.normpath(os.path.join(os.path.expanduser(source_path), path))
241 if not os.path.exists(abspath): 241 if not os.path.exists(abspath):
242 warning(_("The path given in arg doesn't exist or is not accessible: %s") % abspath) 242 warning(_("The path given in arg doesn't exist or is not accessible: %s") % abspath.decode('utf-8','replace'))
243 else: 243 else:
244 if os.path.isdir(abspath): 244 if os.path.isdir(abspath):
245 full_dest_path = dest_path if os.path.isabs(path) else os.path.normpath(os.path.join(dest_path, path)) 245 full_dest_path = dest_path if os.path.isabs(path) else os.path.normpath(os.path.join(dest_path, path))
246 if not options.recursive: 246 if not options.recursive:
247 warning (_('omitting directory "%s"') % abspath) 247 warning (_('omitting directory "%s"') % abspath)