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:
chaos.proton@gmail.com 2012-07-22 10:49:52 +00:00
parent 21c9c6e13a
commit 0b1f748701
1 changed files with 1 additions and 1 deletions

View File

@ -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)