|
Lines 40-45
import optparse
Link Here
|
| 40 |
import os |
40 |
import os |
| 41 |
import sys |
41 |
import sys |
| 42 |
from typing import IO # noqa F401 |
42 |
from typing import IO # noqa F401 |
|
|
43 |
import textwrap |
| 43 |
|
44 |
|
| 44 |
import ldap |
45 |
import ldap |
| 45 |
import ldif |
46 |
import ldif |
|
Lines 64-76
def _update_schema(fp, attr):
Link Here
|
| 64 |
if oid in OIDS: |
65 |
if oid in OIDS: |
| 65 |
continue |
66 |
continue |
| 66 |
obj = subschema.get_obj(ldap.schema.AttributeType, oid) |
67 |
obj = subschema.get_obj(ldap.schema.AttributeType, oid) |
| 67 |
fp.write('attributetype %s\n' % (obj,)) |
68 |
obj_wraped = "\n ".join(textwrap.wrap(obj, 1500, break_long_words=False)) |
|
|
69 |
fp.write('attributetype %s\n' % (obj_wraped,)) |
| 68 |
|
70 |
|
| 69 |
for oid in replication.subschema_sort(subschema, ldap.schema.ObjectClass): |
71 |
for oid in replication.subschema_sort(subschema, ldap.schema.ObjectClass): |
| 70 |
if oid in OIDS: |
72 |
if oid in OIDS: |
| 71 |
continue |
73 |
continue |
| 72 |
obj = subschema.get_obj(ldap.schema.ObjectClass, oid) |
74 |
obj = subschema.get_obj(ldap.schema.ObjectClass, oid) |
| 73 |
fp.write('objectclass %s\n' % (obj,)) |
75 |
obj_wraped = "\n ".join(textwrap.wrap(obj, 1500, break_long_words=False)) |
|
|
76 |
fp.write('objectclass %s\n' % (obj_wraped,)) |
| 74 |
|
77 |
|
| 75 |
|
78 |
|
| 76 |
def update_schema(lo): |
79 |
def update_schema(lo): |