浏览代码

[test] Identify download errors better

dirkf 3 年之前
父节点
当前提交
4f10e1e7c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/test_download.py

+ 1 - 1
test/test_download.py

@@ -164,7 +164,7 @@ def generator(test_case, tname):
                     if not err.exc_info[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError, compat_http_client.BadStatusLine) or (err.exc_info[0] == compat_HTTPError and err.exc_info[1].code == 503):
                         msg = getattr(err, 'msg', error_to_compat_str(err))
                         err.msg = '%s (%s)' % (msg, tname, )
-                        raise
+                        raise err
 
                     if try_num == RETRIES:
                         report_warning('%s failed due to network errors, skipping...' % tname)