Use dict instead of substitute string
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 17 Apr 2009 14:26:17 +0000 (14:26 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 17 Apr 2009 14:26:17 +0000 (14:26 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2545 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 4fbc1b9c600d13a257444a14ff6c924cc436b033..f71f0e1037cd3342f4cf8f06c3312beddf081b4b 100644 (file)
@@ -388,12 +388,9 @@ def isSupported(module, project):
     module = project.info("MODULES")[module]
     if "supports" in module:
         support_string = module["supports"]
-        for tag, value in tag_dict.items():
-            while support_string.find(tag) != -1:
-                support_string = support_string.replace(tag, value)
         supported = {}
         try:
-            exec "supported = " + support_string in {}, supported
+            exec "supported = " + support_string in tag_dict, supported
         except:
             raise SupportedException(support_string)
         return supported["supported"]