Fix python 2.5 specific code (Andrew Gillies)
This commit is contained in:
parent
b315e56e4c
commit
fac9e9997a
1
AUTHORS
1
AUTHORS
|
@ -46,6 +46,7 @@ Further patches have been submitted by:
|
|||
S. Çağlar Onur <caglar-at-pardus-dot-org-dot-tr>
|
||||
Claes Strom <cs-at-clabbe-dot-com>
|
||||
Mike MacCana <mmaccana-at-au1-dot-ibm-dot-com>
|
||||
Andrew Gillies <anaru-at-main-dot-com>
|
||||
|
||||
<...send a patch & get your name here...>
|
||||
|
||||
|
|
|
@ -661,11 +661,12 @@ class vmmDomain(gobject.GObject):
|
|||
ctx = None
|
||||
ret = []
|
||||
try:
|
||||
doc = libxml2.parseDoc(self.get_xml())
|
||||
ctx = doc.xpathNewContext()
|
||||
ret = parse_function(ctx)
|
||||
except Exception, e:
|
||||
logging.debug("Error parsing domain xml: %s" % str(e))
|
||||
try:
|
||||
doc = libxml2.parseDoc(self.get_xml())
|
||||
ctx = doc.xpathNewContext()
|
||||
ret = parse_function(ctx)
|
||||
except Exception, e:
|
||||
logging.debug("Error parsing domain xml: %s" % str(e))
|
||||
finally:
|
||||
if ctx:
|
||||
ctx.xpathFreeContext()
|
||||
|
|
Loading…
Reference in New Issue