mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-23 01:46:37 +08:00
fix: http_proxy 环境变量为空检查
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@ class ProxyManager:
|
|||||||
self.forward_proxies['https://'] = self.ap.system_cfg.data['network-proxies']['https']
|
self.forward_proxies['https://'] = self.ap.system_cfg.data['network-proxies']['https']
|
||||||
|
|
||||||
# 设置到环境变量
|
# 设置到环境变量
|
||||||
os.environ['HTTP_PROXY'] = self.forward_proxies['http://']
|
os.environ['HTTP_PROXY'] = self.forward_proxies['http://'] or ''
|
||||||
os.environ['HTTPS_PROXY'] = self.forward_proxies['https://']
|
os.environ['HTTPS_PROXY'] = self.forward_proxies['https://'] or ''
|
||||||
|
|
||||||
def get_forward_proxies(self) -> dict:
|
def get_forward_proxies(self) -> dict:
|
||||||
return self.forward_proxies.copy()
|
return self.forward_proxies.copy()
|
||||||
|
|||||||
Reference in New Issue
Block a user