mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Catch and report exceptions in Auto-reload
Fixes #399 Also updated the keyboard interrupt to report before quit.
This commit is contained in:
parent
d726e5e81c
commit
70ed05625f
1 changed files with 6 additions and 0 deletions
|
|
@ -258,7 +258,13 @@ def main():
|
|||
|
||||
time.sleep(.5) # sleep to avoid cpu load
|
||||
except KeyboardInterrupt:
|
||||
logger.warning("Keyboard interrupt, quitting.")
|
||||
break
|
||||
except Exception, e:
|
||||
logger.warning(
|
||||
"Caught exception \"{}\". Reloading.".format(e)
|
||||
)
|
||||
continue
|
||||
else:
|
||||
pelican.run()
|
||||
except Exception, e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue