#NEWLINE# @ cli . command ( 'connect' ) #NEWLINE# @ click . option ( '--cert-check/--no-cert-check' , default = True , help = 'Enables or disables certificate checks.' ) #NEWLINE# @ click . argument ( 'name' ) #NEWLINE# @ pass_context #NEWLINE# def connect( ctx , name , cert_check ) : #NEWLINE# #INDENT# 'Connects to a VPN profile.' #NEWLINE# sys . stdout . write ( ( '\x1b]0;VPN to %s\x07' % name ) ) #NEWLINE# sys . stdout . flush ( ) #NEWLINE# try : #NEWLINE# #INDENT# ctx . profile_manager . connect ( name , cert_check = cert_check ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# sys . stdout . write ( '\x1b]0;\x07' ) #NEWLINE# sys . stdout . flush ( )