iambus/xunlei-lixian — pull request #291 by pright (2013-07-19 07:20:07+00:00)
Title: bt下载完毕hash时utf8解码错误

Hashing bt ...
Traceback (most recent call last):
File "/usr/bin/lixian_cli", line 64, in
execute_command()
File "/usr/bin/lixian_cli", line 61, in execute_command
commands[command](args[1:])
File "/opt/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, *args, **kwargs))
File "/opt/xunlei-lixian/lixian_commands/download.py", line 296, in download_task
download_multiple_tasks(client, tasks, download_args)
File "/opt/xunlei-lixian/lixian_commands/download.py", line 208, in download_multiple_tasks
download_single_task(client, task, options)
File "/opt/xunlei-lixian/lixian_commands/download.py", line 190, in download_single_task
verified = lixian_hash_bt.verify_bt(output_path, lixian_hash_bt.bdecode(torrent_file)['info'], file_set=file_set, progress_callback=bar.update)
File "/opt/xunlei-lixian/lixian_hash_bt.py", line 244, in verify_bt
return verify_bt_multiple(path, info, file_set=file_set, progress_callback=progress_callback)
File "/opt/xunlei-lixian/lixian_hash_bt.py", line 169, in verify_bt_multiple
unicode_path = [p.decode(path_encoding) for p in x['path']]
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 3: invalid continuation byte