Mercurial > piecrust2
comparison foodtruck/pubutil.py @ 669:65706804e1de
admin: Fix crash when running FoodTruck as a standalone web app.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 03 Mar 2016 21:36:04 -0800 |
parents | cbb170d9c894 |
children | 3885421c29a3 |
comparison
equal
deleted
inserted
replaced
668:a1b69b320217 | 669:65706804e1de |
---|---|
20 global server_shutdown | 20 global server_shutdown |
21 server_shutdown = True | 21 server_shutdown = True |
22 raise KeyboardInterrupt() | 22 raise KeyboardInterrupt() |
23 | 23 |
24 | 24 |
25 if app.config['FOODTRUCK_CMDLINE_MODE']: | 25 if app.config.get('FOODTRUCK_CMDLINE_MODE', False): |
26 # Make sure CTRL+C works correctly. | 26 # Make sure CTRL+C works correctly. |
27 signal.signal(signal.SIGINT, | 27 signal.signal(signal.SIGINT, |
28 lambda *args: _shutdown_server_and_raise_sigint()) | 28 lambda *args: _shutdown_server_and_raise_sigint()) |
29 | 29 |
30 | 30 |