Set default description if not set

This commit is contained in:
Joshua Boniface 2018-09-06 12:16:01 -04:00
parent 4dbb8c7eb2
commit 9af3b032fb
1 changed files with 4 additions and 1 deletions

5
pvc.py
View File

@ -93,7 +93,10 @@ def stopZKConnection(zk_conn):
def getDomainMainDetails(parsed_xml):
# Get the information we want from it
duuid = str(parsed_xml.uuid)
ddescription = str(parsed_xml.description)
try:
ddescription = str(parsed_xml.description)
except AttributeError:
ddescription = "N/A"
dname = str(parsed_xml.name)
dmemory = str(parsed_xml.memory)
dmemory_unit = str(parsed_xml.memory.attrib['unit'])