Skip to content

Commit 9cca6a7

Browse files
authored
fix: running code in windows environment (#30)
* running code in windows environment I was getting file not found error, as it turned out the path to the redshift-ca-bundle.crt was incorrectly constructed on MS Windows platform * Revert "running code in windows environment" This reverts commit efcf32b. * docs: running code in MS Windows
1 parent fbc9b5a commit 9cca6a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redshift_connector/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,10 @@ def __init__(
486486
# ssl_context = ssl.create_default_context()
487487

488488
path = os.path.abspath(__file__)
489-
path = "/".join(path.split("/")[:-1]) + "/files/redshift-ca-bundle.crt"
489+
if os.name == "nt":
490+
path = "\\".join(path.split("\\")[:-1]) + "\\files\\redshift-ca-bundle.crt"
491+
else:
492+
path = "/".join(path.split("/")[:-1]) + "/files/redshift-ca-bundle.crt"
490493

491494
ssl_context: SSLContext = SSLContext()
492495
ssl_context.verify_mode = CERT_REQUIRED

0 commit comments

Comments
 (0)