Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if cid!='' and cid!='web':
if ext!='': ext+='&'
ext+='wcid='+cid
if i.get('extra_url','')!='':
if ext!='': ext+='&'
ext+=i['extra_url']
if ext!='':
rurl+='/?'+ext
import webbrowser
webbrowser.open(rurl)
try:
server = ThreadedHTTPServer((host, int(port)), server_handler)
# Prevent issues with socket reuse
server.allow_reuse_address=True
server.serve_forever()
except KeyboardInterrupt:
ck.out('Keyboard interrupt, terminating CK web service ...')
server.socket.close()
return {'return':0}
except OSError as e:
return {'return':1, 'error':'problem starting CK web service ('+format(e)+')'}
return {'return':0}