3792f02
# Don't crash due to weird PCI cards (Bug 767742)
3792f02
3792f02
diff -r fb8dd4c67778 tools/python/xen/util/pci.py
3792f02
--- a/tools/python/xen/util/pci.py	Tue Dec 13 14:16:20 2011 -0500
3792f02
+++ b/tools/python/xen/util/pci.py	Wed Dec 14 15:46:56 2011 -0500
3792f02
@@ -1268,7 +1268,12 @@ class PciDevice:
3792f02
             pass
3792f02
 
3792f02
     def get_info_from_sysfs(self):
3792f02
-        self.find_capability(0x11)
3792f02
+        try:
3792f02
+            self.find_capability(0x11)
3792f02
+        except PciDeviceParseError, err:
3792f02
+            log.error("Caught '%s'" % err)
3792f02
+            return False
3792f02
+
3792f02
         sysfs_mnt = find_sysfs_mnt()
3792f02
         if sysfs_mnt == None:
3792f02
             return False