1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 12:27:47 +02:00
This commit is contained in:
kakwa 2019-02-07 20:16:39 +01:00
parent be598b0129
commit 3d6e24eb73
5 changed files with 27 additions and 24 deletions

View file

@ -9,14 +9,14 @@ import os
import sys
import copy
if sys.version < '3':
from sets import Set as set
from ldapcherry.pyyamlwrapper import loadNoDump
from ldapcherry.pyyamlwrapper import DumplicatedKey
from ldapcherry.exceptions import *
import yaml
if sys.version < '3':
from sets import Set as set
class CustomDumper(yaml.SafeDumper):
"A custom YAML dumper that never emits aliases"
@ -32,7 +32,7 @@ class Roles:
self.backends = set([])
try:
stream = open(role_file, 'r')
except:
except Exception as e:
raise MissingRolesFile(role_file)
try:
self.roles_raw = loadNoDump(stream)