提交 0b1f7487 编写于 作者: C chaos.proton@gmail.com

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
上级 21c9c6e1
......@@ -69,7 +69,7 @@ def MDK4Project(target, script):
# add group
groups = tree.find('Targets/Target/Groups')
if not groups:
if groups is None:
groups = SubElement(tree.find('Targets/Target'), 'Groups')
for group in script:
group_xml = MDK4AddGroup(ProjectFiles, groups, group['name'], group['src'], project_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册