diff options
| author | Antti Haapala <antti@haapala.name> | 2014-02-16 16:13:39 +0200 |
|---|---|---|
| committer | Antti Haapala <antti@haapala.name> | 2014-02-16 16:13:39 +0200 |
| commit | 606a54cc890b345fc001b603a23f7990c9c58407 (patch) | |
| tree | 72c2983cedf3bc3da630439a8b0dce0bc56094e7 | |
| parent | c444a314433ae55148eadd6481120bb875a954c1 (diff) | |
| download | pyramid-606a54cc890b345fc001b603a23f7990c9c58407.tar.gz pyramid-606a54cc890b345fc001b603a23f7990c9c58407.tar.bz2 pyramid-606a54cc890b345fc001b603a23f7990c9c58407.zip | |
Fix pserve --reload on Py3 (the simple solution)
This is the simpler fix for `pserve --reload` (so please pull either https://github.com/Pylons/pyramid/pull/1244 or this).
Basically with some project setups the reloader thread is guaranteed to crash on Python 3 as the main thread is importing modules in the other thread.
| -rw-r--r-- | pyramid/scripts/pserve.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index 03cbc23ab..ea125a0dd 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -811,7 +811,7 @@ class Monitor(object): # pragma: no cover print( "Error calling reloader callback %r:" % file_callback) traceback.print_exc() - for module in sys.modules.values(): + for module in list(sys.modules.values()): try: filename = module.__file__ except (AttributeError, ImportError): |
