Permalink
Browse files

dotDict: fixed obscure bug related to deepcopy

  • Loading branch information...
trey0 committed Mar 19, 2013
1 parent e27718f commit ac4504cfc64601c1c02a360a8ae353173b98fa92
Showing with 2 additions and 0 deletions.
  1. +2 −0 geocamUtil/dotDict.py
View
@@ -34,6 +34,8 @@ def __repr__(self):
return json.dumps(self, sort_keys=True, indent=4)
def __getattr__(self, attr):
+ if attr.startswith('__'):
+ raise AttributeError(attr) # avoids breaking copy.deepcopy
if attr in self._badFields:
raise KeyError(attr)
return self.get(attr, None)

0 comments on commit ac4504c

Please sign in to comment.