Ticket #858 (defect)
Opened 2 months ago
Last modified 2 months ago
Bug in cherrypy/process/plugins.py
Status: closed (fixed)
| Reported by: | pstoll@akamai.com | Assigned to: | fumanchu |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | CherryPy code | Keywords: | |
| Cc: |
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]
Change History
09/27/08 14:41:56: Modified by fumanchu
- status changed from new to assigned.
- description changed.
- milestone set to 3.1.
09/27/08 14:49:00: Modified by fumanchu
- status changed from assigned to closed.
- resolution set to fixed.
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.


Reformatted.