diff --git a/gunicorn/reloader.py b/gunicorn/reloader.py index 219ffa83..130e3d60 100644 --- a/gunicorn/reloader.py +++ b/gunicorn/reloader.py @@ -26,7 +26,7 @@ class Reloader(threading.Thread): def get_files(self): fnames = [ re.sub('py[co]$', 'py', module.__file__) - for module in sys.modules.values() + for module in list(sys.modules.values()) if hasattr(module, '__file__') ]