File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2490,6 +2490,16 @@ def init_platforms(self):
2490
2490
# proxy's handling of this signal may change in future if other actions are seen as more suitable
2491
2491
signal .signal (signal .SIGUSR1 , lambda _signum , _fr : self .toggle_debug (Log .get_level () == logging .INFO ))
2492
2492
2493
+ # certificates are not imported automatically when packaged using pyinstaller - we need certifi
2494
+ if getattr (sys , 'frozen' , False ):
2495
+ if ssl .get_default_verify_paths ().cafile is None and 'SSL_CERT_FILE' not in os .environ :
2496
+ try :
2497
+ import certifi
2498
+ os .environ ['SSL_CERT_FILE' ] = certifi .where ()
2499
+ Log .info ('Running in a packaged/frozen environment - imported SSL certificates from `certifi`' )
2500
+ except ImportError :
2501
+ Log .info ('Unable to find `certifi` in a packaged/frozen environment - SSL connections may fail' )
2502
+
2493
2503
# noinspection PyUnresolvedReferences,PyAttributeOutsideInit
2494
2504
def macos_nsworkspace_notification_listener_ (self , notification ):
2495
2505
notification_name = notification .name ()
You can’t perform that action at this time.
0 commit comments