File size: 606 Bytes
2651a17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3
import os
import sys
import ssl
import warnings

# Disable SSL warnings
warnings.filterwarnings('ignore')

# Create custom SSL context that doesn't verify
def create_no_verify_ssl_context():
    ctx = ssl.create_default_context()
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE
    return ctx

# Patch the default SSL context
ssl._create_unverified_context = create_no_verify_ssl_context

# Now import and run agent
if __name__ == '__main__':
    from agent import agents
    agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=__import__('agent').entrypoint))