summaryrefslogtreecommitdiff
path: root/swift/common/middleware/catch_errors.py
diff options
context:
space:
mode:
authorBrian Cline <bcline@softlayer.com>2014-05-10 05:15:12 -0500
committerBrian Cline <bcline@softlayer.com>2014-05-10 11:15:56 +0000
commitb4c5a136642bb87816bfbbad81b79efd4551a05e (patch)
tree7e803aaa9e3fd222b71e2ddd7e019d5fd4eb82e3 /swift/common/middleware/catch_errors.py
parent1dfe5186542486342581ab66cd5364b6b7d04e93 (diff)
downloadswift-b4c5a136642bb87816bfbbad81b79efd4551a05e.tar.gz
Uses None instead of mutables for function param defaults
As seen on #1174809, changes use of mutable types as default arguments and defaults them within the method. Otherwise, those defaults can be unexpectedly persisted with the function between invocations and erupt into mass hysteria on the streets. There was indeed a test (TestSimpleClient.test_get_with_retries) that was erroneously relying on this behavior. Since previous tests had populated their own instantiations with a token, this test only passed because the modified headers dict from previous tests was being overridden. As expected, with the mutable defaults fix in SimpleClient, this test begain to fail since it never specified any token, yet it has always passed anyway. This change also now provides the expected token. Change-Id: If95f11d259008517dab511e88acfe9731e5a99b5 Related-Bug: #1174809
Diffstat (limited to 'swift/common/middleware/catch_errors.py')
0 files changed, 0 insertions, 0 deletions