Commits

Jason R. Coombs committed 6e29506

Iterate over copy of sys.modules.items() to avoid RuntimeError in AutoReloader. Fixes #1280.

  • Participants
  • Parent commits f8850e2
  • Branches cherrypy-3.2.x

Comments (0)

Files changed (1)

File cherrypy/process/plugins.py

     def sysfiles(self):
         """Return a Set of sys.modules filenames to monitor."""
         files = set()
-        for k, m in sys.modules.items():
+        for k, m in list(sys.modules.items()):
             if re.match(self.match, k):
                 if hasattr(m, '__loader__') and hasattr(m.__loader__, 'archive'):
                     f = m.__loader__.archive