assert nonnull soledad
authorKali Kaneko <kali@futeisha.org>
Sun, 1 Sep 2013 23:04:51 +0000 (01:04 +0200)
committerKali Kaneko <kali@futeisha.org>
Sun, 1 Sep 2013 23:04:51 +0000 (01:04 +0200)
src/leap/keymanager/keys.py

index 1c33745..b8e88d4 100644 (file)
@@ -219,6 +219,8 @@ class EncryptionScheme(object):
         """
         Initialize the database indexes.
         """
+        leap_assert(self._soledad is not None,
+                    "Cannot init indexes with null soledad")
         # Ask the database for currently existing indexes.
         db_indexes = dict(self._soledad.list_indexes())
         # Loop through the indexes we expect to find.