p123client 0.0.7.2__py3-none-any.whl → 0.0.7.2.1__py3-none-any.whl

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.
p123client/client.py CHANGED
@@ -488,7 +488,7 @@ class P123OpenClient:
488
488
  request_kwargs["session"] = self.async_session if async_ else self.session
489
489
  request_kwargs["async_"] = async_
490
490
  request = get_default_request()
491
- if self.can_relogin():
491
+ if self.check_for_relogin:
492
492
  headers = dict(self.headers)
493
493
  if request_headers := request_kwargs.get("headers"):
494
494
  headers.update(request_headers)
@@ -526,8 +526,8 @@ class P123OpenClient:
526
526
  if token != token_new:
527
527
  headers["authorization"] = "Bearer " + self.token
528
528
  continue
529
- if i:
530
- raise
529
+ if i or not self.can_relogin():
530
+ return resp
531
531
  user_id = getattr(self, "user_id", None)
532
532
  warn(f"relogin to refresh token: {user_id=}", category=P123Warning)
533
533
  yield self.login(replace=True, async_=async_)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p123client
3
- Version: 0.0.7.2
3
+ Version: 0.0.7.2.1
4
4
  Summary: Python 123 webdisk client.
5
5
  Home-page: https://github.com/ChenyangGao/p123client
6
6
  License: MIT
@@ -1,12 +1,12 @@
1
1
  LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
2
  p123client/__init__.py,sha256=lcTiBpyNHH1HN4f1ueacumxkaahBNOUyvNA172UtSOU,214
3
- p123client/client.py,sha256=GLVJPwLFUhH043q4GXOSD8nqIJHhazYY4gNCUy3Hi_o,357375
3
+ p123client/client.py,sha256=SVjKTnnMaRC_YCEOO0X25dQx3MPCRNy-TfTbJSzRkmc,357411
4
4
  p123client/const.py,sha256=UYfBrgciCz7RJJPqCX6zwWlMoWiaTUwUU8bpFJyh0sM,348
5
5
  p123client/exception.py,sha256=Vn2UlJulY63z3cF7bnTjMlZ6og7gCw1pAA-dswFwKpQ,3174
6
6
  p123client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  p123client/tool/__init__.py,sha256=hnOwkk1CKk1CLGlhl6hlUl3BWNdqXdy8sWKXAGmOXHE,18812
8
8
  p123client/type.py,sha256=T17OzPQrnIG6w_Hzjc8TF_fFMKa-hQMSn1gff8pVcBc,56
9
- p123client-0.0.7.2.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
10
- p123client-0.0.7.2.dist-info/METADATA,sha256=RwvkD4bZ_ma7fJ7ODAPJg54hOvsC2nYcc765nFObY54,14657
11
- p123client-0.0.7.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
12
- p123client-0.0.7.2.dist-info/RECORD,,
9
+ p123client-0.0.7.2.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
10
+ p123client-0.0.7.2.1.dist-info/METADATA,sha256=MaVx6AFHNqqqOkBQXnCyuLDy3PHYwGIvgPzB3xGwFnw,14659
11
+ p123client-0.0.7.2.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
12
+ p123client-0.0.7.2.1.dist-info/RECORD,,