Skip to content

Commit

Permalink
Stripped trailing white-spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jun 6, 2015
1 parent 036700d commit 7248568
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 60 deletions.
4 changes: 2 additions & 2 deletions Lib/ldap/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: async.py,v 1.33 2013/09/21 03:55:38 stroeder Exp $
\$Id: async.py,v 1.34 2015/06/06 09:21:37 stroeder Exp $
Python compability note:
Tested on Python 2.0+ but should run on Python 1.5.x.
Expand Down Expand Up @@ -103,7 +103,7 @@ def preProcessing(self):

def afterFirstResult(self):
"""
Do anything you want right after successfully receiving but before
Do anything you want right after successfully receiving but before
processing first result
"""

Expand Down
4 changes: 2 additions & 2 deletions Lib/ldap/controls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
See http://www.python-ldap.org/ for details.
$Id: __init__.py,v 1.9 2013/05/29 20:27:32 stroeder Exp $
$Id: __init__.py,v 1.10 2015/06/06 09:21:38 stroeder Exp $
Description:
The ldap.controls module provides LDAPControl classes.
Expand Down Expand Up @@ -45,7 +45,7 @@
class RequestControl:
"""
Base class for all request controls
controlType
OID as string of the LDAPv3 extended request control
criticality
Expand Down
10 changes: 5 additions & 5 deletions Lib/ldap/controls/libldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
See http://www.python-ldap.org/ for details.
$Id: libldap.py,v 1.2 2011/07/23 07:42:04 stroeder Exp $
$Id: libldap.py,v 1.3 2015/06/06 09:21:38 stroeder Exp $
"""

import _ldap,ldap
Expand All @@ -20,8 +20,8 @@ class AssertionControl(RequestControl):
LDAP filter string specifying which assertions have to match
so that the server processes the operation
"""
controlType = ldap.CONTROL_ASSERT

controlType = ldap.CONTROL_ASSERT
def __init__(self,criticality=True,filterstr='(objectClass=*)'):
self.criticality = criticality
self.filterstr = filterstr
Expand All @@ -40,9 +40,9 @@ class MatchedValuesControl(RequestControl):
LDAP filter string specifying which attribute values
should be returned
"""

controlType = ldap.CONTROL_VALUESRETURNFILTER

def __init__(self,criticality=False,filterstr='(objectClass=*)'):
self.criticality = criticality
self.filterstr = filterstr
Expand Down
4 changes: 2 additions & 2 deletions Lib/ldap/controls/ppolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
See http://www.python-ldap.org/ for project details.
$Id: ppolicy.py,v 1.3 2011/11/27 15:26:06 stroeder Exp $
$Id: ppolicy.py,v 1.4 2015/06/06 09:21:38 stroeder Exp $
"""

__all__ = [
Expand Down Expand Up @@ -91,6 +91,6 @@ def decodeControlValue(self,encodedControlValue):
self.error = None
else:
self.error = int(error)


KNOWN_RESPONSE_CONTROLS[PasswordPolicyControl.controlType] = PasswordPolicyControl
12 changes: 6 additions & 6 deletions Lib/ldap/controls/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
See http://www.python-ldap.org/ for details.
$Id: simple.py,v 1.9 2012/08/09 07:01:20 stroeder Exp $
$Id: simple.py,v 1.10 2015/06/06 09:21:38 stroeder Exp $
"""

import struct,ldap
Expand Down Expand Up @@ -34,7 +34,7 @@ def encodeControlValue(self):
class OctetStringInteger(LDAPControl):
"""
Base class with controlValue being unsigend integer values
integerValue
Integer to be sent as OctetString
"""
Expand All @@ -49,7 +49,7 @@ def encodeControlValue(self):

def decodeControlValue(self,encodedControlValue):
self.integerValue = struct.unpack('!Q',encodedControlValue)[0]


class BooleanControl(LDAPControl):
"""
Expand Down Expand Up @@ -100,7 +100,7 @@ def __init__(self,criticality=False):
class ProxyAuthzControl(RequestControl):
"""
Proxy Authorization Control
authzId
string containing the authorization ID indicating the identity
on behalf which the server should process the request
Expand All @@ -123,9 +123,9 @@ def __init__(self,criticality):
class AuthorizationIdentityResponseControl(ResponseControl):
"""
Authorization Identity Request and Response Controls
Class attributes:
authzId
decoded authorization identity
"""
Expand Down
10 changes: 5 additions & 5 deletions Lib/ldap/dn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: dn.py,v 1.12 2014/05/20 20:15:15 stroeder Exp $
\$Id: dn.py,v 1.13 2015/06/06 09:21:37 stroeder Exp $
Compability:
- Tested with Python 2.0+
Expand Down Expand Up @@ -31,7 +31,7 @@ def escape_dn_chars(s):
s = s.replace('>' ,'\\>')
s = s.replace(';' ,'\\;')
s = s.replace('=' ,'\\=')
s = s.replace('\000' ,'\\\000')
s = s.replace('\000' ,'\\\000')
if s[0]=='#' or s[0]==' ':
s = ''.join(('\\',s))
if s[-1]==' ':
Expand All @@ -43,7 +43,7 @@ def str2dn(dn,flags=0):
"""
This function takes a DN as string as parameter and returns
a decomposed DN. It's the inverse to dn2str().
flags describes the format of the dn
See also the OpenLDAP man-page ldap_str2dn(3)
Expand All @@ -69,7 +69,7 @@ def dn2str(dn):
def explode_dn(dn,notypes=0,flags=0):
"""
explode_dn(dn [, notypes=0]) -> list
This function takes a DN and breaks it up into its component parts.
The notypes parameter is used to specify that only the component's
attribute values be returned and not the attribute types.
Expand All @@ -95,7 +95,7 @@ def explode_dn(dn,notypes=0,flags=0):
def explode_rdn(rdn,notypes=0,flags=0):
"""
explode_rdn(rdn [, notypes=0]) -> list
This function takes a RDN and breaks it up into its component parts
if it is a multi-valued RDN.
The notypes parameter is used to specify that only the component's
Expand Down
6 changes: 3 additions & 3 deletions Lib/ldap/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: filter.py,v 1.9 2011/07/22 07:20:53 stroeder Exp $
\$Id: filter.py,v 1.10 2015/06/06 09:21:37 stroeder Exp $
Compability:
- Tested with Python 2.0+
Expand All @@ -16,7 +16,7 @@ def escape_filter_chars(assertion_value,escape_mode=0):
"""
Replace all special characters found in assertion_value
by quoted notation.
escape_mode
If 0 only special chars mentioned in RFC 4515 are escaped.
If 1 all NON-ASCII chars are escaped.
Expand All @@ -41,7 +41,7 @@ def escape_filter_chars(assertion_value,escape_mode=0):
s = s.replace(r'(', r'\28')
s = s.replace(r')', r'\29')
s = s.replace('\x00', r'\00')
return s
return s


def filter_format(filter_template,assertion_values):
Expand Down
4 changes: 2 additions & 2 deletions Lib/ldap/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: functions.py,v 1.30 2014/05/20 20:44:28 stroeder Exp $
\$Id: functions.py,v 1.31 2015/06/06 09:21:37 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
Expand Down Expand Up @@ -135,7 +135,7 @@ def set_option(option,invalue):

def escape_str(escape_func,s,*args):
"""
Applies escape_func() to all items of `args' and returns a string based
Applies escape_func() to all items of `args' and returns a string based
on format string `s'.
"""
escape_args = map(escape_func,args)
Expand Down
6 changes: 3 additions & 3 deletions Lib/ldap/ldapobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: ldapobject.py,v 1.144 2015/05/02 16:19:23 stroeder Exp $
\$Id: ldapobject.py,v 1.145 2015/06/06 09:21:38 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
Expand Down Expand Up @@ -139,7 +139,7 @@ def __getattr__(self,name):
def fileno():
"""
Returns file description of LDAP connection.
Just a convenience wrapper for LDAPObject.get_option(ldap.OPT_DESC)
"""
return self.get_option(ldap.OPT_DESC)
Expand Down Expand Up @@ -662,7 +662,7 @@ def search_subschemasubentry_s(self,dn=''):
def read_s(self,dn,filterstr=None,attrlist=None,serverctrls=None,clientctrls=None,timeout=-1):
"""
Reads and returns a single entry specified by `dn'.
Other attributes just like those passed to `search_ext_s()'
"""
r = self.search_ext_s(
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class logging_file_class:

def __init__(self,logging_level):
self._logging_level = logging_level

def write(self,msg):
logging.log(self._logging_level,msg[:-1])

Expand Down
6 changes: 3 additions & 3 deletions Lib/ldap/sasl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: sasl.py,v 1.16 2014/03/23 19:06:47 stroeder Exp $
\$Id: sasl.py,v 1.17 2015/06/06 09:21:38 stroeder Exp $
Description:
The ldap.sasl module provides SASL authentication classes.
Expand Down Expand Up @@ -63,7 +63,7 @@ def callback(self,cb_id,challenge,prompt,defresult):
useful for writing generic sasl GUIs, which would need to know all
the questions to ask, before the answers are returned to the sasl
lib (in contrast to one question at a time)."""

# The following print command might be useful for debugging
# new sasl mechanisms. So it is left here
cb_result = self.cb_value_dict.get(cb_id,defresult) or ''
Expand All @@ -73,7 +73,7 @@ def callback(self,cb_id,challenge,prompt,defresult):
cb_id, challenge, prompt, repr(defresult), repr(self.cb_value_dict.get(cb_result))
))
return cb_result


class cram_md5(sasl):
"""This class handles SASL CRAM-MD5 authentication."""
Expand Down
Loading

0 comments on commit 7248568

Please sign in to comment.