Commits

Anonymous committed daababb Draft

Don't allow Attrs to block native attributes

Comments (0)

Files changed (1)

gnocchi/tools/attr.py

             )
 
     def __getitem__( self, key ):
-        self._load_cache()
-        return self._attributes[key]
+        try:
+            return getattr(self, key)
+        except AttributeError:
+            self._load_cache()
+            return self._attributes[key]
 
     def __setitem__( self, key, value ):
         try: