Skip to content

Commit

Permalink
[BUG] Set SSL paths on linux (#1203)
Browse files Browse the repository at this point in the history
* Inject ssl cert env variables for linux machines
  • Loading branch information
samster25 authored Jul 31, 2023
1 parent bc11e57 commit 832ea26
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions daft/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
from __future__ import annotations

import sys

from daft.io._csv import read_csv
from daft.io._json import read_json
from daft.io.config import IOConfig, S3Config
from daft.io.file_path import from_glob_path
from daft.io.parquet import read_parquet


def _set_linux_cert_paths():
import os
import ssl

paths = ssl.get_default_verify_paths()
if paths.cafile:
os.environ[paths.openssl_cafile_env] = paths.openssl_cafile
if paths.capath:
os.environ[paths.openssl_capath_env] = paths.openssl_capath


if sys.platform == "linux":
_set_linux_cert_paths()

__all__ = ["read_csv", "read_json", "from_glob_path", "read_parquet", "IOConfig", "S3Config"]

0 comments on commit 832ea26

Please sign in to comment.