From: duplo Date: Fri, 17 Apr 2009 14:26:17 +0000 (+0000) Subject: Use dict instead of substitute string X-Git-Tag: 2.1.0~137 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0896e23ade8d8ebc863c17f6bed66a94fd5328f2;p=bertos.git Use dict instead of substitute string git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2545 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 4fbc1b9c..f71f0e10 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -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"]