Skip to content

Commit 30857ac

Browse files
author
Grégoire Sage
committed
Fix emu config pages on linux (Argument list too long)
1 parent cd60510 commit 30857ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pebble_tool/util/browser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ def __init__(self):
2121
def open_config_page(self, url, callback):
2222
self.port = port = self._choose_port()
2323
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)
2430
webbrowser.open_new(url)
2531
self.serve_page(port, callback)
2632

0 commit comments

Comments
 (0)