Skip to content

Commit

Permalink
changed classmethod to staticmethod in basestrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
cannatag committed Mar 18, 2015
1 parent c02978d commit a8fc6a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ldap3/strategy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ def get_response(self, message_id, timeout=RESPONSE_WAITING_TIMEOUT):

return response, result

@classmethod
def compute_ldap_message_size(cls, data):
@staticmethod
def compute_ldap_message_size(data):
"""
Compute LDAP Message size according to BER definite length rules
Returns -1 if too few data to compute message length
Expand Down Expand Up @@ -380,8 +380,8 @@ def decode_response(self, ldap_message):
result['controls'][decoded_control[0]] = decoded_control[1]
return result

@classmethod
def decode_control(cls, control):
@staticmethod
def decode_control(control):
"""
decode control, return a 2-element tuple where the first element is the control oid
and the second element is a dictionary with description (from Oids), criticality and decoded control value
Expand All @@ -399,8 +399,8 @@ def decode_control(cls, control):

return control_type, {'description': Oids.get(control_type, ''), 'criticality': criticality, 'value': control_value}

@classmethod
def decode_request(cls, ldap_message):
@staticmethod
def decode_request(ldap_message):
message_type = ldap_message.getComponentByName('protocolOp').getName()
component = ldap_message['protocolOp'].getComponent()
if message_type == 'bindRequest':
Expand Down

0 comments on commit a8fc6a9

Please sign in to comment.