Skip to content

Commit

Permalink
disable SSL check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Provencher committed Jun 5, 2023
1 parent ec62be0 commit 7341bf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions collection_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_stac_collection(self, stac_host, collection_id):
Returns the collection JSON.
"""
r = requests.get(os.path.join(stac_host, "collections", collection_id))
r = requests.get(os.path.join(stac_host, "collections", collection_id), verify=False)

if r.status_code == 200:
return r.json()
Expand All @@ -89,7 +89,7 @@ def get_stac_collection_queryables(self, stac_host, collection_id):
Returns the queryables JSON.
"""
r = requests.get(os.path.join(stac_host, "collections", collection_id, "queryables"))
r = requests.get(os.path.join(stac_host, "collections", collection_id, "queryables"), verify=False)

if r.status_code == 200:
return r.json()
Expand Down Expand Up @@ -146,13 +146,13 @@ def post_collection(self, stac_host, json_data):
Returns the collection id.
"""
collection_id = json_data['id']
r = requests.post(os.path.join(stac_host, "collections"), json=json_data)
r = requests.post(os.path.join(stac_host, "collections"), json=json_data, verify=False)

if r.status_code == 200:
print(f"{bcolors.OKGREEN}[INFO] Pushed STAC collection [{collection_id}] to [{stac_host}] ({r.status_code}){bcolors.ENDC}")
elif r.status_code == 409:
print(f"{bcolors.WARNING}[INFO] STAC collection [{collection_id}] already exists on [{stac_host}] ({r.status_code}), updating..{bcolors.ENDC}")
r = requests.put(os.path.join(stac_host, "collections"), json=json_data)
r = requests.put(os.path.join(stac_host, "collections"), json=json_data, verify=False)
r.raise_for_status()
else:
r.raise_for_status()
Expand Down

0 comments on commit 7341bf7

Please sign in to comment.