2008-02-25 17:47:18 +01:00
|
|
|
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 @@
|
2008-02-04 01:10:25 +01:00
|
|
|
|
|
|
|
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):
|
2008-02-25 17:47:18 +01:00
|
|
|
+ if device_interface == None:
|
|
|
|
+ return False
|
2008-02-04 01:10:25 +01:00
|
|
|
+ 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
|
2008-02-25 17:47:18 +01:00
|
|
|
@@ -161,7 +175,7 @@
|
2008-02-04 01:10:25 +01:00
|
|
|
|
|
|
|
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")
|
|
|
|
|
2008-02-25 17:47:18 +01:00
|
|
|
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 @@
|
2008-02-04 01:10:25 +01:00
|
|
|
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):
|
2008-02-25 17:47:18 +01:00
|
|
|
+ if device_interface == None:
|
|
|
|
+ return False
|
2008-02-04 01:10:25 +01:00
|
|
|
+ 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 = {}
|
2008-02-25 17:47:18 +01:00
|
|
|
@@ -71,7 +84,7 @@
|
2008-02-04 01:10:25 +01:00
|
|
|
|
|
|
|
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")
|