File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,14 @@ def dcv_connect(args):
8787 url = "https://{IP}:{PORT}?authToken={TOKEN}#{SESSION_ID}" .format (
8888 IP = master_ip , PORT = dcv_server_port , TOKEN = dcv_session_token , SESSION_ID = dcv_session_id
8989 )
90+ url_message = "Please use the following one-time URL in your browser within 30 seconds:\n {0}" .format (url )
9091
9192 if args .show_url :
92- LOGGER .info ("Please use the following one-time URL in your browser within 30 seconds: \n {0}" . format ( url ) )
93+ LOGGER .info (url_message )
9394 return
9495
9596 try :
96- webbrowser .open_new (url )
97- except webbrowser .Error :
98- LOGGER .info (
99- "Unable to open the Web browser. "
100- "Please use the following URL in your browser within 30 seconds:\n {0}" .format (url )
101- )
97+ if not webbrowser .open_new (url ):
98+ raise webbrowser .Error ("Unable to open the Web browser." )
99+ except webbrowser .Error as e :
100+ LOGGER .info ("{0}\n {1}" .format (e , url_message ))
You can’t perform that action at this time.
0 commit comments