1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-06-19 18:22:57 +02:00
ldapcherry/misc/debug_roles.py

21 lines
577 B
Python
Raw Normal View History

2015-05-15 01:03:31 +02:00
from ldapcherry.roles import Roles
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
inv = Roles('./conf/roles.yml')
print
print inv.dump_nest()