Skip to content

Commit 2ffb2ba

Browse files
committed
Flatten proxy_settings
Signed-off-by: Matthew Kim <[email protected]>
1 parent 552ef8f commit 2ffb2ba

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/databricks/sql/cloudfetch/downloader.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,19 @@ def run(self):
4040

4141
if (
4242
# DownloadableExecutionContext > HiveExecutionContext > HiveJDBCSettings > ProxySettings > boolean
43-
self.settings.proxy_settings.use_proxy
43+
self.settings.use_proxy
4444
# DownloadableExecutionContext > HiveExecutionContext > HiveJDBCSettings > ProxySettings > boolean
45-
and not self.settings.proxy_settings.disable_proxy_for_cloud_fetch
45+
and not self.settings.disable_proxy_for_cloud_fetch
4646
):
47-
proxy_settings = self.settings.proxy_settings
4847
proxy = {
49-
"http": f"http://{proxy_settings.proxy_host}:{proxy_settings.proxy_port}",
50-
"https": f"http://{proxy_settings.proxy_host}:{proxy_settings.proxy_port}",
48+
"http": f"http://{self.settings.proxy_host}:{self.settings.proxy_port}",
49+
"https": f"http://{self.settings.proxy_host}:{self.settings.proxy_port}",
5150
}
5251
session.proxies.update(proxy)
5352

5453
# ProxyAuthentication -> static enum BASIC and NONE
55-
if proxy_settings.proxy_auth == "BASIC":
56-
session.auth = requests.auth.HTTPBasicAuth(proxy_settings.proxy_uid, proxy_settings.proxy_pwd)
54+
if self.settings.proxy_auth == "BASIC":
55+
session.auth = requests.auth.HTTPBasicAuth(self.settings.proxy_uid, self.settings.proxy_pwd)
5756

5857
try:
5958
response = session.get(self.result_link.file_link)

0 commit comments

Comments
 (0)