mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 07:56:52 +08:00
AutoCloseResponse支持上下文管理协议,避免部分插件报错
This commit is contained in:
@@ -80,6 +80,12 @@ class AutoCloseResponse:
|
|||||||
for name, value in state.items():
|
for name, value in state.items():
|
||||||
setattr(self, name, value)
|
setattr(self, name, value)
|
||||||
|
|
||||||
|
def __enter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, *args):
|
||||||
|
self.close()
|
||||||
|
|
||||||
class RequestUtils:
|
class RequestUtils:
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|||||||
Reference in New Issue
Block a user