mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 14:43:37 +00:00
418af7d7aa
With this change it's possible to override the libvirt package used if you absolutely need it.
25 lines
721 B
Diff
25 lines
721 B
Diff
diff --git a/nixops/backends/libvirtd.py b/nixops/backends/libvirtd.py
|
|
index bc5f4af7..edd1348b 100644
|
|
--- a/nixops/backends/libvirtd.py
|
|
+++ b/nixops/backends/libvirtd.py
|
|
@@ -8,12 +8,18 @@ import shutil
|
|
import string
|
|
import subprocess
|
|
import time
|
|
-import libvirt
|
|
|
|
from nixops.backends import MachineDefinition, MachineState
|
|
import nixops.known_hosts
|
|
import nixops.util
|
|
|
|
+try:
|
|
+ import libvirt
|
|
+except:
|
|
+ class libvirt(object):
|
|
+ def __getattribute__(self, name):
|
|
+ raise ValueError("The libvirt backend has been disabled because of security issues.")
|
|
+
|
|
# to prevent libvirt errors from appearing on screen, see
|
|
# https://www.redhat.com/archives/libvirt-users/2017-August/msg00011.html
|
|
|