Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pony
rework_ui
Commits
d7b165935d28
Commit
9e377045
authored
Oct 31, 2018
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
rework_ui/cli.py
View file @
d7b16593
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment