Issue #858 resolved

Bug in cherrypy/process/plugins.py

Anonymous created an issue

Hi,

It looks like sometimes one of these two arguments is being built as a list and is throwing an exception when you try to do set operations (|) on them.

Diff below fixing the issue. I'm coercing them both to sets and this handles it.

-Perry

{{{ *** /usr/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/process/plugins.py 2008-09-16 19:44:42.000000000 -0400 --- /usr/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/process/plugins.py~ 2008-09-16 19:42:54.000000000 -0400


443,449 * k = getattr(m, 'file', None) sysfiles.add(k)

! for filename in set(sysfiles) | set(self.files): if filename: if filename.endswith('.pyc'): filename = filename[:-1] --- 443,449 ---- k = getattr(m, 'file', None) sysfiles.add(k)

! for filename in sysfiles | self.files: if filename: if filename.endswith('.pyc'): filename = filename[:-1] }}}

Reported by pstoll@akamai.com

Comments (4)

  1. Robert Brewer

    The only place I can see in CP that could set either of those to a list is in `_cpconfig.py`:

        elif k == 'reload_files':
            engine.autoreload.files = v
    

    I just changed that to `set(v)` in [2040]. Let me know if that fixes it for you.

  2. Log in to comment