virt-install: don't fail on storage pools without targets.

(crobinso: Add Tom to AUTHORS)
This commit is contained in:
Tom Lanyon 2013-03-26 10:33:08 +10:30 committed by Cole Robinson
parent ae0e151c8a
commit ef2bdc4722
2 changed files with 2 additions and 1 deletions

View File

@ -157,6 +157,7 @@ Further patches have been submitted by:
John Doyle <spdubhghaill@gmail.com>
Giuseppe Scrivano <gscrivano@gnu.org>
Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Tom Lanyon <tom@oneshoeco.com>
<...send a patch & get your name here...>

View File

@ -544,7 +544,7 @@ def lookup_pool_by_path(conn, path):
def check_pool(poolname, path):
pool = conn.storagePoolLookupByName(poolname)
xml_path = get_xml_path(pool.XMLDesc(0), "/pool/target/path")
if os.path.abspath(xml_path) == path:
if xml_path is not None and os.path.abspath(xml_path) == path:
return pool
running_list = conn.listStoragePools()