don't cache tag in Component
authorTimo Savola <tsavola@movial.fi>
Sun, 6 Apr 2008 07:02:43 +0000 (10:02 +0300)
committerTimo Savola <tsavola@movial.fi>
Sun, 6 Apr 2008 07:02:49 +0000 (10:02 +0300)
matrix/config.py

index 41f8b50..c958b82 100644 (file)
@@ -57,7 +57,6 @@ class Component(object):
 
                self.flags = flags
 
-               self.__active_tag = None
                self.active_packages = None
                self.active_depends = None
                self.active_state = None
@@ -68,15 +67,10 @@ class Component(object):
                return cmp(self.name, other.name)
 
        def get_active_tag(self):
-               global board
-
-               if self.__active_tag is None:
-                       tag = self.tags.get(board)
-                       if not tag:
-                               tag = self.tags.get(None)
-                       self.__active_tag = tag
-
-               return self.__active_tag
+               tag = self.tags.get(board)
+               if not tag:
+                       tag = self.tags.get(None)
+               return tag
 
 class PlatformProvidedComponent(Component):
        """A Component that is provided by the platform.