From e77f0830754b1eb86ee53d82d10e2c76fe31cae6 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 30 Sep 2018 13:44:29 +0200 Subject: Fix incorrect copying of module names @ autoreload --- cherrypy/process/plugins.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))) -- cgit v1.2.1