Fixed xml.etree future warning
authorEd Bartosh <eduard.bartosh@intel.com>
Tue, 11 Mar 2014 18:42:50 +0000 (20:42 +0200)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 12 Mar 2014 03:07:22 +0000 (11:07 +0800)
commit7e8f0ac8ff6268e5560dbc6b3a46d5edfe85b91e
tree8d678cf755a5d202f52c0b3966d1485e73186a16
parent9bb57ece883ea7ee4744238ea7300cb7ab9cee6e
Fixed xml.etree future warning

New distros come with new xml.etree API, which produces this warning
when using oscapi:
 /usr/lib/python2.7/site-packages/gitbuildsys/oscapi.py:105:
FutureWarning: The behavior of this method will change in future
versions. Use specific 'len(elem)' or 'elem is not None' test instead.
if element:

This is also mentioned in the python documentation for xml.etree.find API:
Caution: Elements with no subelements will test as False. This behavior
will change in future versions. Use specific len(elem) or elem is None
test instead.

Fixes: #1706

Change-Id: I84c4a947125a8d96584fef609dc5266b97447c0e
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
gitbuildsys/oscapi.py