summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-09-30 13:44:29 +0200
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-09-30 13:44:29 +0200
commite77f0830754b1eb86ee53d82d10e2c76fe31cae6 (patch)
tree0f4d17158da3709ae8d36fd0bcb8e286f85c2132
parent0cf5f3698a78c7d07f5bc43a1afda5acc6479db6 (diff)
downloadcherrypy-git-e77f0830754b1eb86ee53d82d10e2c76fe31cae6.tar.gz
Fix incorrect copying of module names @ autoreload
-rw-r--r--cherrypy/process/plugins.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cherrypy/process/plugins.py b/cherrypy/process/plugins.py
index b7cfa521..d2f87a4d 100644
--- a/cherrypy/process/plugins.py
+++ b/cherrypy/process/plugins.py
@@ -626,7 +626,10 @@ class Autoreloader(Monitor):
def sysfiles(self):
"""Return a Set of sys.modules filenames to monitor."""
- search_mod_names = filter(re.compile(self.match).match, sys.modules[:])
+ search_mod_names = filter(
+ re.compile(self.match).match,
+ list(sys.modules.keys()),
+ )
mods = map(sys.modules.get, search_mod_names)
return set(filter(None, map(self._file_for_module, mods)))