p115client 0.0.5.10.2__tar.gz → 0.0.5.10.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/PKG-INFO +1 -1
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/pool.py +2 -2
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/util.py +2 -2
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/pyproject.toml +1 -1
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/LICENSE +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/__init__.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/_upload.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/client.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/const.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/exception.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/py.typed +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/__init__.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/attr.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/download.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/edit.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/export_dir.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/fs_files.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/history.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/iterdir.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/life.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/request.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/upload.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/tool/xys.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/p115client/type.py +0 -0
- {p115client-0.0.5.10.2 → p115client-0.0.5.10.3}/readme.md +0 -0
@@ -24,7 +24,7 @@ from p115client import check_response, P115Client
|
|
24
24
|
from p115client.const import AVAILABLE_APP_IDS
|
25
25
|
from p115client.exception import P115OSError, AuthenticationError, LoginError
|
26
26
|
|
27
|
-
from .util import
|
27
|
+
from .util import get_status_code, is_timeouterror
|
28
28
|
|
29
29
|
|
30
30
|
@total_ordering
|
@@ -374,7 +374,7 @@ def call_wrap_with_pool(get_cert_headers: Callable, /, func: Callable) -> Callab
|
|
374
374
|
except BaseException as e:
|
375
375
|
if isinstance(e, P115OSError) and e.args[1].get("errno") == 40101004:
|
376
376
|
raise
|
377
|
-
if not isinstance(e, (AuthenticationError, LoginError)) and
|
377
|
+
if not isinstance(e, (AuthenticationError, LoginError)) and get_status_code(e) != 405:
|
378
378
|
revert()
|
379
379
|
raise
|
380
380
|
return run_gen_step(gen_step, async_=async_)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
__author__ = "ChenyangGao <https://chenyanggao.github.io>"
|
5
5
|
__all__ = [
|
6
|
-
"
|
6
|
+
"get_status_code", "is_timeouterror", "posix_escape_name", "reduce_image_url_layers",
|
7
7
|
"share_extract_payload", "unescape_115_charref",
|
8
8
|
]
|
9
9
|
__doc__ = "这个模块提供了一些工具函数"
|
@@ -23,7 +23,7 @@ class SharePayload(TypedDict):
|
|
23
23
|
receive_code: None | str
|
24
24
|
|
25
25
|
|
26
|
-
def
|
26
|
+
def get_status_code(e: BaseException, /) -> None | int:
|
27
27
|
"""获取 HTTP 请求异常的状态码(如果有的话)
|
28
28
|
"""
|
29
29
|
status = (
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|