mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
capabilities: Handle missing cpu_map.xml
It shouldn't be a fatal issue. Hit on freebsd where they install libvirt bits into /usr/local https://www.redhat.com/archives/virt-tools-list/2015-September/msg00056.html
This commit is contained in:
parent
5df6757a0b
commit
b15c44923c
@ -19,6 +19,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
from .cpu import CPU as DomainCPU
|
||||
@ -55,7 +57,12 @@ class _CPUMapFileValues(XMLBuilder):
|
||||
_cpu_filename = "/usr/share/libvirt/cpu_map.xml"
|
||||
|
||||
def __init__(self, conn):
|
||||
if os.path.exists(self._cpu_filename):
|
||||
xml = file(self._cpu_filename).read()
|
||||
else:
|
||||
xml = None
|
||||
logging.debug("CPU map file not found: %s", self._cpu_filename)
|
||||
|
||||
XMLBuilder.__init__(self, conn, parsexml=xml)
|
||||
|
||||
self._archmap = {}
|
||||
|
Loading…
Reference in New Issue
Block a user