- commit
- 2ef6b0db1f2f322dbe0778918f5b4db5e68934c0
- parent
- d50da0ac84f916c85d7845c9a1baf4336d632875
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2015-04-11 06:46
do ot crash if LDIF is not available
Diffstat
| M | cctool.py | 15 | ++++++++------- |
1 files changed, 8 insertions, 7 deletions
diff --git a/cctool.py b/cctool.py
@@ -255,13 +255,14 @@ class ABook(Format): 255 255 cp.write(fh) 256 256 257 257258 -1 class LDIFParser(ldif.LDIFParser):259 -1 def __init__(self, fh):260 -1 ldif.LDIFParser.__init__(self, fh)261 -1 self.entries = {}262 -1263 -1 def handle(self, dn, entry):264 -1 self.entries[dn] = entry-1 258 if not isinstance(ldif, Exception): -1 259 class LDIFParser(ldif.LDIFParser): -1 260 def __init__(self, fh): -1 261 ldif.LDIFParser.__init__(self, fh) -1 262 self.entries = {} -1 263 -1 264 def handle(self, dn, entry): -1 265 self.entries[dn] = entry 265 266 266 267 267 268 class LDIF(Format):