[PATCH 10/11] Don't require nss, required only for escrow key support.
David Lehman
dlehman at redhat.com
Mon Feb 4 23:32:36 UTC 2013
---
blivet/__init__.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 3081319..8c854f2 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -37,7 +37,11 @@ import sys
import statvfs
import copy
-import nss.nss
+try:
+ import nss.nss
+except ImportError:
+ nss = None
+
import parted
from pykickstart.constants import *
@@ -216,6 +220,10 @@ def writeEscrowPackets(storage):
log.debug("escrow: writeEscrowPackets start")
+ if not nss:
+ log.error("escrow: no nss python module -- aborting")
+ return
+
nss.nss.nss_init_nodb() # Does nothing if NSS is already initialized
backupPassphrase = generateBackupPassphrase()
--
1.8.1
More information about the anaconda-patches
mailing list