From: Keir Fraser Date: Thu, 12 Mar 2009 11:33:35 +0000 (+0000) Subject: xend: Use parse_hex() in XendPPCI.py X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13992^2~86 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7caeec9358d229ff90fb4aaa617240deca3d63ed;p=xen.git xend: Use parse_hex() in XendPPCI.py Signed-off-by: Yosuke Iwamatsu --- diff --git a/tools/python/xen/xend/XendPPCI.py b/tools/python/xen/xend/XendPPCI.py index 9ea61218d9..e6248b714a 100644 --- a/tools/python/xen/xend/XendPPCI.py +++ b/tools/python/xen/xend/XendPPCI.py @@ -20,6 +20,8 @@ from xen.xend.XendBase import XendBase from xen.xend.XendBase import XendAPIStore from xen.xend import uuid as genuuid +from xen.util.pci import parse_hex + class XendPPCI(XendBase): """Representation of a physical PCI device.""" @@ -72,10 +74,10 @@ class XendPPCI(XendBase): def get_by_sbdf(self, domain, bus, slot, func): for ppci in XendAPIStore.get_all("PPCI"): - if ppci.get_domain() == int(domain, 16) and \ - ppci.get_bus() == int(bus, 16) and \ - ppci.get_slot() == int(slot, 16) and \ - ppci.get_func() == int(func, 16): + if ppci.get_domain() == parse_hex(domain) and \ + ppci.get_bus() == parse_hex(bus) and \ + ppci.get_slot() == parse_hex(slot) and \ + ppci.get_func() == parse_hex(func): return ppci.get_uuid() return None