]> jfr.im git - yt-dlp.git/commitdiff
[utils] certifi: Make sure the pem file exists
authorpukkandan <redacted>
Mon, 11 Apr 2022 23:53:27 +0000 (05:23 +0530)
committerpukkandan <redacted>
Tue, 12 Apr 2022 00:02:53 +0000 (05:32 +0530)
Closes #3353

yt_dlp/utils.py

index 35e8d1d5b685d8035259c2dc6fd749c2a2a90697..966548466e7d5d789770e9addca63620b394374f 100644 (file)
@@ -70,7 +70,8 @@
 
 try:
     import certifi
-    has_certifi = True
+    # The certificate may not be bundled in executable
+    has_certifi = os.path.exists(certifi.where())
 except ImportError:
     has_certifi = False