Skip to content

Commit

Permalink
Fix recursion error when copying settings._wrapped
Browse files Browse the repository at this point in the history
jazzband#8 for more information
  • Loading branch information
Eric Davis committed Sep 16, 2011
1 parent 96ee34e commit 39af53a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion analytical/tests/utils.py
Expand Up @@ -81,7 +81,13 @@ def inner(*args, **kwargs):
return inner

def enable(self):
override = UserSettingsHolder(copy.copy(settings._wrapped))
class OverrideSettingsHolder(UserSettingsHolder):
def __getattr__(self, name):
if name == "default_settings":
return self.__dict__["default_settings"]
return getattr(self.default_settings, name)

override = OverrideSettingsHolder(copy.copy(settings._wrapped))
for key, new_value in self.options.items():
if new_value is SETTING_DELETED:
try:
Expand Down

0 comments on commit 39af53a

Please sign in to comment.