mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
adding an exception for failures to open role file
This commit is contained in:
parent
17b8aa6406
commit
804e2b7202
3 changed files with 25 additions and 3 deletions
|
@ -9,6 +9,7 @@ class MissingParameter(Exception):
|
|||
def __init__(self, section, key):
|
||||
self.section = section
|
||||
self.key = key
|
||||
self.log = "missing parameter <%(key)s> in section <%(section)s>" % { 'key' : key, 'section' : section }
|
||||
|
||||
class MissingKey(Exception):
|
||||
def __init__(self, key):
|
||||
|
@ -17,8 +18,17 @@ class MissingKey(Exception):
|
|||
class DumplicateRoleKey(Exception):
|
||||
def __init__(self, role):
|
||||
self.role = role
|
||||
self.log = "duplicate role key <%(role)s> in role file" % { 'role' : role}
|
||||
|
||||
class DumplicateRoleContent(Exception):
|
||||
def __init__(self, role1, role2):
|
||||
self.role1 = role1
|
||||
self.role2 = role2
|
||||
self.log = "role <%(role1)s> and <%(role2)s> are identical" % { 'role1' : role1, 'role2': role2}
|
||||
|
||||
class MissingRolesFile(Exception):
|
||||
def __init__(self, rolefile):
|
||||
self.rolefile = rolefile
|
||||
self.log = "fail to open role file <%(rolefile)s>" % { 'rolefile' : rolefile}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue