1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-05 00:58:55 +01:00
ldapcherry/misc/debug_attributes.py
kakwa 7cdbe459b6 change backend key name in attributes + methods
* adding get_backends
* adding get_selfattributes (attributes users can change themselves)
* adding unit tests
* rename backend-attributes -> bakends (for homogeneity with role.yml)
2015-05-18 12:30:51 +02:00

23 lines
679 B
Python

from ldapcherry.attributes import Attributes
from ldapcherry.exceptions import DumplicateRoleKey, MissingKey, DumplicateRoleContent, MissingRolesFile
from ldapcherry.pyyamlwrapper import DumplicatedKey, RelationError
from yaml import load, dump
import yaml
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
class CustomDumper(yaml.SafeDumper):
"A custom YAML dumper that never emits aliases"
def ignore_aliases(self, _data):
return True
try:
#inv = Attributes('./conf/attributes.yml')
inv = Attributes('./tests/cfg/attributes_wrong_type.yml')
except Exception as e:
print e.log