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):
24902490 # proxy's handling of this signal may change in future if other actions are seen as more suitable
24912491 signal .signal (signal .SIGUSR1 , lambda _signum , _fr : self .toggle_debug (Log .get_level () == logging .INFO ))
24922492
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+
24932503 # noinspection PyUnresolvedReferences,PyAttributeOutsideInit
24942504 def macos_nsworkspace_notification_listener_ (self , notification ):
24952505 notification_name = notification .name ()
You can’t perform that action at this time.
0 commit comments