Skip to content

Commit fe498c4

Browse files
committed
Revert "add envvar MAPILLARY__DISABLE_VERIFYING_SSL that disables SSL verification"
This reverts commit cff1385.
1 parent 6bbd62f commit fe498c4

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

mapillary_tools/api_v4.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
MAPILLARY_GRAPH_API_ENDPOINT = os.getenv(
1010
"MAPILLARY_GRAPH_API_ENDPOINT", "https://graph.mapillary.com"
1111
)
12-
# https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification
13-
MAPILLARY__DISABLE_VERIFYING_SSL = (
14-
os.getenv("MAPILLARY__DISABLE_VERIFYING_SSL") == "TRUE"
15-
)
1612
REQUESTS_TIMEOUT = 60 # 1 minutes
1713

1814

@@ -22,7 +18,6 @@ def get_upload_token(email: str, password: str) -> requests.Response:
2218
params={"access_token": MAPILLARY_CLIENT_TOKEN},
2319
json={"email": email, "password": password, "locale": "en_US"},
2420
timeout=REQUESTS_TIMEOUT,
25-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
2621
)
2722
resp.raise_for_status()
2823
return resp
@@ -40,7 +35,6 @@ def fetch_organization(
4035
"Authorization": f"OAuth {user_access_token}",
4136
},
4237
timeout=REQUESTS_TIMEOUT,
43-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
4438
)
4539
resp.raise_for_status()
4640
return resp
@@ -62,7 +56,6 @@ def logging(action_type: ActionType, properties: T.Dict) -> requests.Response:
6256
"Authorization": f"OAuth {MAPILLARY_CLIENT_TOKEN}",
6357
},
6458
timeout=REQUESTS_TIMEOUT,
65-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
6659
)
6760
resp.raise_for_status()
6861
return resp

mapillary_tools/upload_api_v4.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
MAPILLARY_GRAPH_API_ENDPOINT = os.getenv(
1616
"MAPILLARY_GRAPH_API_ENDPOINT", "https://graph.mapillary.com"
1717
)
18-
# https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification
19-
MAPILLARY__DISABLE_VERIFYING_SSL = (
20-
os.getenv("MAPILLARY__DISABLE_VERIFYING_SSL") == "TRUE"
21-
)
2218
DEFAULT_CHUNK_SIZE = 1024 * 1024 * 16 # 16MB
2319
# According to the docs, UPLOAD_REQUESTS_TIMEOUT can be a tuple of
2420
# (connection_timeout, read_timeout): https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
@@ -101,7 +97,6 @@ def fetch_offset(self) -> int:
10197
url,
10298
headers=headers,
10399
timeout=REQUESTS_TIMEOUT,
104-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
105100
)
106101
LOG.debug("HTTP response %s: %s", resp.status_code, resp.content)
107102
resp.raise_for_status()
@@ -144,7 +139,6 @@ def upload(
144139
headers=headers,
145140
data=chunk,
146141
timeout=UPLOAD_REQUESTS_TIMEOUT,
147-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
148142
)
149143
LOG.debug(
150144
"HTTP response %s: %s", resp.status_code, _truncate_end(resp.content)
@@ -191,7 +185,6 @@ def finish(self, file_handle: str) -> str:
191185
headers=headers,
192186
json=data,
193187
timeout=REQUESTS_TIMEOUT,
194-
verify=not MAPILLARY__DISABLE_VERIFYING_SSL,
195188
)
196189
LOG.debug("HTTP response %s: %s", resp.status_code, _truncate_end(resp.content))
197190

0 commit comments

Comments
 (0)