From f4906bb090b296e0251bc74a7936d6cf693e399a Mon Sep 17 00:00:00 2001 From: kakwa Date: Fri, 22 May 2015 09:50:44 +0200 Subject: [PATCH] adding exception for wrong backend query --- ldapcherry/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ldapcherry/exceptions.py b/ldapcherry/exceptions.py index a69c59d..bd612e6 100644 --- a/ldapcherry/exceptions.py +++ b/ldapcherry/exceptions.py @@ -33,6 +33,11 @@ class MissingBackend(Exception): self.backend = backend self.log = "backend <%(backend)s> does not exist in main config file" % { 'backend' : backend} +class WrongBackend(Exception): + def __init__(self, backend): + self.backend = backend + self.log = "backend <%(backend)s> does not exist" % { 'backend' : backend} + class DumplicateRoleContent(Exception): def __init__(self, role1, role2): self.role1 = role1