Skip to content

Commit 98999bd

Browse files
tiranencukou
authored andcommitted
Make schema attribute names text
Schema attribute names must be text in Python 2, too. Otherwise read_subschemasubentry_s() fails with bytes error. Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 3ae51ed commit 98999bd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/ldap/schema/models.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ObjectClass(SchemaElement):
127127
This list of strings contains NAMEs or OIDs of object classes
128128
this object class is derived from
129129
"""
130-
schema_attribute = 'objectClasses'
130+
schema_attribute = u'objectClasses'
131131
token_defaults = {
132132
'NAME':(()),
133133
'DESC':(None,),
@@ -225,7 +225,7 @@ class AttributeType(SchemaElement):
225225
This list of strings contains NAMEs or OIDs of attribute types
226226
this attribute type is derived from
227227
"""
228-
schema_attribute = 'attributeTypes'
228+
schema_attribute = u'attributeTypes'
229229
token_defaults = {
230230
'NAME':(()),
231231
'DESC':(None,),
@@ -319,7 +319,7 @@ class LDAPSyntax(SchemaElement):
319319
Integer flag (0 or 1) indicating whether the attribute type is marked
320320
as not human-readable (X-NOT-HUMAN-READABLE)
321321
"""
322-
schema_attribute = 'ldapSyntaxes'
322+
schema_attribute = u'ldapSyntaxes'
323323
token_defaults = {
324324
'DESC':(None,),
325325
'X-NOT-HUMAN-READABLE':(None,),
@@ -367,7 +367,7 @@ class MatchingRule(SchemaElement):
367367
syntax
368368
String contains OID of the LDAP syntax this matching rule is usable with
369369
"""
370-
schema_attribute = 'matchingRules'
370+
schema_attribute = u'matchingRules'
371371
token_defaults = {
372372
'NAME':(()),
373373
'DESC':(None,),
@@ -413,7 +413,7 @@ class MatchingRuleUse(SchemaElement):
413413
This list of strings contains NAMEs or OIDs of attribute types
414414
for which this matching rule is used
415415
"""
416-
schema_attribute = 'matchingRuleUse'
416+
schema_attribute = u'matchingRuleUse'
417417
token_defaults = {
418418
'NAME':(()),
419419
'DESC':(None,),
@@ -470,7 +470,7 @@ class DITContentRule(SchemaElement):
470470
This list of strings contains NAMEs or OIDs of attributes which
471471
may not be present in an entry of the object class
472472
"""
473-
schema_attribute = 'dITContentRules'
473+
schema_attribute = u'dITContentRules'
474474
token_defaults = {
475475
'NAME':(()),
476476
'DESC':(None,),
@@ -527,7 +527,7 @@ class DITStructureRule(SchemaElement):
527527
List of strings with NAMEs or OIDs of allowed structural object classes
528528
of superior entries in the DIT
529529
"""
530-
schema_attribute = 'dITStructureRules'
530+
schema_attribute = u'dITStructureRules'
531531

532532
token_defaults = {
533533
'NAME':(()),
@@ -591,7 +591,7 @@ class NameForm(SchemaElement):
591591
This list of strings contains NAMEs or OIDs of additional attributes
592592
an RDN may contain
593593
"""
594-
schema_attribute = 'nameForms'
594+
schema_attribute = u'nameForms'
595595
token_defaults = {
596596
'NAME':(()),
597597
'DESC':(None,),

0 commit comments

Comments
 (0)