diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.5.3/src/virtManager/connection.py --- virt-manager-0.5.3.orig/src/virtManager/connection.py 2008-02-20 14:13:33.000000000 -0700 +++ virt-manager-0.5.3/src/virtManager/connection.py 2008-02-20 14:14:31.000000000 -0700 @@ -136,6 +136,20 @@ self.detect_network_devices() + # A bug in hal prevents us from calling QueryCapability on devices + # this is a temporary workaround that can be removed when we get + # a newer hald/hald_dbus.c + def _query_capability(self, device_interface, str_capability): + if device_interface == None: + return False + if not device_interface.PropertyExists('info.capabilities'): + return False + cap_set = set(device_interface.GetProperty('info.capabilities')) + if str_capability in cap_set: + return True + return False + + def detect_network_devices(self): try: # Get a connection to the SYSTEM bus @@ -161,7 +175,7 @@ def _device_added(self, path): obj = self.bus.get_object("org.freedesktop.Hal", path) - if obj.QueryCapability("net"): + if self._query_capability(obj,"net"): name = obj.GetPropertyString("net.interface") mac = obj.GetPropertyString("net.address") diff -Nuar virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py virt-manager-0.5.3/src/virtManager/opticalhelper.py --- virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py 2008-02-20 14:13:33.000000000 -0700 +++ virt-manager-0.5.3/src/virtManager/opticalhelper.py 2008-02-20 14:14:57.000000000 -0700 @@ -41,6 +41,19 @@ self.hal_iface = None raise + # A bug in hal prevents us from calling QueryCapability on devices + # this is a temporary workaround that can be removed when we get + # a newer hald/hald_dbus.c + def _query_capability(self, device_interface, str_capability): + if device_interface == None: + return False + if not device_interface.PropertyExists('info.capabilities'): + return False + cap_set = set(device_interface.GetProperty('info.capabilities')) + if str_capability in cap_set: + return True + return False + def populate_opt_media(self): # get a list of optical devices with data discs in, for FV installs vollabel = {} @@ -71,7 +84,7 @@ def _device_added(self, path): vol = self.bus.get_object("org.freedesktop.Hal", path) - if vol.QueryCapability("volume"): + if self._query_capability(vol,"volume"): if vol.GetPropertyBoolean("volume.is_disc") and \ vol.GetPropertyBoolean("volume.disc.has_data"): devnode = vol.GetProperty("block.device")