Use a defaultdict instead of a standard dict for storing the toolchain's infos
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 13 Jan 2009 11:48:15 +0000 (11:48 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 13 Jan 2009 11:48:15 +0000 (11:48 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2171 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 8f91878d151a71fceea48b00f71494eeb9141741..646be2eeb36763c1f72728a841a73e0fc346d8cb 100644 (file)
@@ -13,6 +13,7 @@ import os
 import fnmatch
 import glob
 import re
+import collections
 
 import const
 
@@ -44,7 +45,7 @@ def findToolchains(pathList):
     return list(set(toolchains))
 
 def getToolchainInfo(output):
-    info = {}
+    info = collections.defaultdict(unicode)
     expr = re.compile("Target: .*")
     target = expr.findall(output)
     if len(target) == 1: