We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd60510 commit 30857acCopy full SHA for 30857ac
pebble_tool/util/browser.py
@@ -21,6 +21,12 @@ def __init__(self):
21
def open_config_page(self, url, callback):
22
self.port = port = self._choose_port()
23
url = self.url_append_params(url, {'return_to': 'http://localhost:{}/close?'.format(port)})
24
+ if not url.startswith('file'):
25
+ filename = '/tmp/config.%s.html' % os.getpid()
26
+ temp = open(filename, 'w+b')
27
+ temp.write('<head><meta http-equiv="refresh" content="0;URL={}"></head>'.format(url))
28
+ temp.close()
29
+ url = "file://{}".format(filename)
30
webbrowser.open_new(url)
31
self.serve_page(port, callback)
32
0 commit comments