fix a warning in keil.py
Fix the warning: E:\projects\rt-thread\rtthread-svn\trunk\tools\keil.py:72: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if not groups: See http://docs.python.org/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.remove for detail. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2226 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
21c9c6e13a
commit
0b1f748701
|
@ -69,7 +69,7 @@ def MDK4Project(target, script):
|
||||||
|
|
||||||
# add group
|
# add group
|
||||||
groups = tree.find('Targets/Target/Groups')
|
groups = tree.find('Targets/Target/Groups')
|
||||||
if not groups:
|
if groups is None:
|
||||||
groups = SubElement(tree.find('Targets/Target'), 'Groups')
|
groups = SubElement(tree.find('Targets/Target'), 'Groups')
|
||||||
for group in script:
|
for group in script:
|
||||||
group_xml = MDK4AddGroup(ProjectFiles, groups, group['name'], group['src'], project_path)
|
group_xml = MDK4AddGroup(ProjectFiles, groups, group['name'], group['src'], project_path)
|
||||||
|
|
Loading…
Reference in New Issue