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