summaryrefslogtreecommitdiff
path: root/mock.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2011-10-29 21:46:50 +0100
committerMichael Foord <michael@voidspace.org.uk>2011-10-29 21:46:50 +0100
commitfd86dc9c2d3effb0d09331bf6997dede3710e262 (patch)
treea90d3014d4720fc1d496224e87d67e9ff683b106 /mock.py
parent2da69d6b5c0a5eea7019a6e10de6c8d4bf57322a (diff)
downloadmock-fd86dc9c2d3effb0d09331bf6997dede3710e262.tar.gz
Move a variable out of a loop
Diffstat (limited to 'mock.py')
-rw-r--r--mock.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mock.py b/mock.py
index 7a2449c..c6efdb9 100644
--- a/mock.py
+++ b/mock.py
@@ -1791,8 +1791,9 @@ class MagicMixin(object):
# don't overwrite existing attributes if called a second time
these_magics = these_magics - set(type(self).__dict__)
+ _type = type(self)
for entry in these_magics:
- setattr(type(self), entry, MagicProxy(entry, self))
+ setattr(_type, entry, MagicProxy(entry, self))