Commit 9e377045 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

view: if there is no DISPLAY (e.g. ssh session), signal where to orient a local browser

parent 67079ea7bdef
......@@ -21,7 +21,13 @@ def view(db_uri):
server.daemon = True
server.start()
webbrowser.open('http://{ipaddr}:{port}'.format(ipaddr=ipaddr, port=port))
browser = webbrowser.open(
'http://{ipaddr}:{port}'.format(ipaddr=ipaddr, port=port)
)
if not browser: # no DISPLAY
print('You can point your browser to http://{ipaddr}:{port}'.format(
ipaddr=ipaddr, port=port)
)
input()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment