mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 01:55:20 +03:00
cliconfig: Better error if glib-compile-schemas is not available
This commit is contained in:
parent
876c721d8e
commit
9c4c1e84aa
@ -53,9 +53,15 @@ def _setup_gsettings_path(schemadir):
|
||||
schema and use it directly
|
||||
"""
|
||||
import subprocess
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
exe = find_executable("glib-compile-schemas")
|
||||
if not exe:
|
||||
raise RuntimeError("You must install glib-compile-schemas to run "
|
||||
"virt-manager from git.")
|
||||
|
||||
os.environ["GSETTINGS_SCHEMA_DIR"] = schemadir
|
||||
ret = subprocess.call(["glib-compile-schemas", "--strict", schemadir])
|
||||
ret = subprocess.call([exe, "--strict", schemadir])
|
||||
if ret != 0:
|
||||
raise RuntimeError("Failed to compile local gsettings schemas")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user