Fix warning causing tool failure:

FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
This commit is contained in:
Nate Coraor
2015-02-09 11:43:26 -05:00
parent 7abdea1eaa
commit 19ce7033d3
+1 -1
View File
@@ -308,7 +308,7 @@ class Registry( object ):
append_to_sniff_order()
def load_build_sites( self, root ):
if root.find( 'build_sites' ):
if root.find( 'build_sites' ) is not None:
for elem in root.find( 'build_sites' ).findall( 'site' ):
if not (elem.get( 'type' ) and elem.get( 'file' )):
self.log.exception( "Site is missing required 'type' and 'file' attributes: %s" )