diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-04-23 19:57:49 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-04-23 19:57:49 -0400 |
| commit | 352aebad5e9f5439f428efdeb1c29a51fa4bad96 (patch) | |
| tree | 724e32dc18d8a266d04d724b4a1ba234b35a3360 | |
| parent | a3b7d8eb421d6e909c374c92560cfeec230bba69 (diff) | |
comment to explain sleep
| -rw-r--r-- | lib/extensions/print_pdf.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/extensions/print_pdf.py b/lib/extensions/print_pdf.py index 0cbce479..befb7861 100644 --- a/lib/extensions/print_pdf.py +++ b/lib/extensions/print_pdf.py @@ -294,7 +294,12 @@ class Print(InkstitchExtension): realistic_color_block_svgs=realistic_color_block_svgs ) print_server.start() + + # Wait for print_server.host and print_server.port to be populated. + # Hacky, but Flask doesn't have an option for a callback to be run + # after startup. time.sleep(0.5) + browser_window = open_url("http://%s:%s/" % (print_server.host, print_server.port)) browser_window.wait() print_server.stop() |
