mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #790 from davidjb/raise-exceptions
Raise exceptions from the autoreload loop if debug is enabled
This commit is contained in:
commit
ff571967cf
2 changed files with 5 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ Release history
|
||||||
================
|
================
|
||||||
|
|
||||||
* Support for Python 3!
|
* Support for Python 3!
|
||||||
|
* Ensure exceptions are raised if they take place during processing
|
||||||
|
with autoreload enabled with debug enabled.
|
||||||
|
|
||||||
3.1 (2012-12-04)
|
3.1 (2012-12-04)
|
||||||
================
|
================
|
||||||
|
|
|
||||||
|
|
@ -326,6 +326,9 @@ def main():
|
||||||
files_found_error = False
|
files_found_error = False
|
||||||
time.sleep(1) # sleep to avoid cpu load
|
time.sleep(1) # sleep to avoid cpu load
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if (args.verbosity == logging.DEBUG):
|
||||||
|
logger.critical(e.args)
|
||||||
|
raise
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Caught exception "{0}". Reloading.'.format(e))
|
'Caught exception "{0}". Reloading.'.format(e))
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue