Skip to content

Commit e75c24d

Browse files
Alphixmistotebe
authored andcommitted
ldap.schema.models.Entry - Fix init()
I'm guessing this is partly due to commit 2be2c6b And the update() method can't ever have worked?
1 parent e595f43 commit e75c24d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/ldap/schema/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88

99
import ldap.cidict
10-
from collections import UserDict as IterableUserDict
10+
from collections import UserDict
1111

1212
from ldap.schema.tokenizer import split_tokens,extract_tokens
1313

@@ -640,7 +640,7 @@ def __str__(self):
640640
return '( %s )' % ''.join(result)
641641

642642

643-
class Entry(IterableUserDict):
643+
class Entry(UserDict):
644644
"""
645645
Schema-aware implementation of an LDAP entry class.
646646
@@ -653,7 +653,7 @@ def __init__(self,schema,dn,entry):
653653
self._attrtype2keytuple = {}
654654
self._s = schema
655655
self.dn = dn
656-
IterableUserDict.IterableUserDict.__init__(self,{})
656+
super().__init__()
657657
self.update(entry)
658658

659659
def _at2key(self,nameoroid):
@@ -674,7 +674,7 @@ def _at2key(self,nameoroid):
674674
return t
675675

676676
def update(self,dict):
677-
for key, value in dict.values():
677+
for key, value in dict.items():
678678
self[key] = value
679679

680680
def __contains__(self,nameoroid):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy