details: http://www.bx.psu.edu/hg/galaxy/rev/6491acd0bef2 changeset: 2952:6491acd0bef2 user: Nate Coraor <nate@bx.psu.edu> date: Tue Nov 03 15:39:51 2009 -0500 description: Fix a bug in streaming library tarballs. Quoth James: This bears repeating (heh, again... -nate) -- NEVER use a mutable object (like a dict) as a function parameter default. The default is evaluated once (at def time) and then used for every call to the function. This is really bad since every call, across multiple thread, are writing to that one dict. In this case, it resulted in the values of parameters that have dependencies being persisted across requests. Took me three solid days to find! diffstat: lib/galaxy/util/streamball.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (17 lines): diff -r 2300a80d80e5 -r 6491acd0bef2 lib/galaxy/util/streamball.py --- a/lib/galaxy/util/streamball.py Tue Nov 03 13:04:35 2009 -0500 +++ b/lib/galaxy/util/streamball.py Tue Nov 03 15:39:51 2009 -0500 @@ -7,9 +7,11 @@ log = logging.getLogger( __name__ ) class StreamBall( object ): - def __init__( self, mode, members={} ): + def __init__( self, mode, members=None ): + self.members = members + if members is None: + self.members = {} self.mode = mode - self.members = members self.wsgi_status = None self.wsgi_headeritems = None def add( self, file, relpath ):