Skip to content

Commit

Permalink
fix starttls support
Browse files Browse the repository at this point in the history
a small bug in the LDAPExtendedRequest constructor was making the
LDAPStartTLSRequest constructor fail
  • Loading branch information
Adam Goodman committed Jun 21, 2011
1 parent 1f8ab6d commit 9c6facc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ldaptor/protocols/pureldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,14 +1180,14 @@ def fromBER(klass, tag, content, berdecoder=None):
return r
fromBER = classmethod(fromBER)

def __init__(self, requestName, requestValue=None,
def __init__(self, requestName=None, requestValue=None,

This comment has been minimized.

Copy link
@antong

antong Jul 1, 2011

Is this change intentional? Three lines below, there is "assert requestName is not None".

This comment has been minimized.

Copy link
@akgood

akgood Jul 1, 2011

Owner

Yes, I did that because the LDAPStartTLSRequest class is attempting to call the constructor with requestName as a keyword arg. I suppose it might make more sense to change the call instead of changing the constructor declaration, though.

This comment has been minimized.

Copy link
@antong

antong Jul 1, 2011

Ah, OK.

tag=None):
LDAPProtocolRequest.__init__(self)
BERSequence.__init__(self, [], tag=tag)
assert requestName is not None
assert isinstance(requestName, basestring)
self.requestName=requestName
assert isinstance(requestValue, basestring)
assert requestValue is None or isinstance(requestValue, basestring)
self.requestValue=requestValue

def __str__(self):
Expand Down

0 comments on commit 9c6facc

Please sign in to comment.