Skip to content

Commit

Permalink
Fix pserve --reload on Py3 (the simple solution)
Browse files Browse the repository at this point in the history
This is the simpler fix for `pserve --reload` (so please pull either #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.
  • Loading branch information
ztane committed Feb 16, 2014
1 parent c444a31 commit 606a54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyramid/scripts/pserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def check_reload(self):
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):
Expand Down

0 comments on commit 606a54c

Please sign in to comment.