diff --git a/pebble_tool/util/browser.py b/pebble_tool/util/browser.py index 0b63dbd..76d1e56 100644 --- a/pebble_tool/util/browser.py +++ b/pebble_tool/util/browser.py @@ -21,6 +21,12 @@ def __init__(self): def open_config_page(self, url, callback): self.port = port = self._choose_port() url = self.url_append_params(url, {'return_to': 'http://localhost:{}/close?'.format(port)}) + if not url.startswith('file'): + filename = '/tmp/config.%s.html' % os.getpid() + temp = open(filename, 'w+b') + temp.write(''.format(url)) + temp.close() + url = "file://{}".format(filename) webbrowser.open_new(url) self.serve_page(port, callback)