Skip to content

Commit 18dd7a6

Browse files
author
stroeder
committed
docstring line-wrapping
1 parent 0589259 commit 18dd7a6

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

Lib/ldap/sasl.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,27 @@
3030

3131

3232
class sasl:
33-
"""This class handles SASL interactions for authentication.
33+
"""
34+
This class handles SASL interactions for authentication.
3435
If an instance of this class is passed to ldap's sasl_bind_s()
3536
method, the library will call its callback() method. For
3637
specific SASL authentication mechanisms, this method can be
37-
overridden"""
38+
overridden
39+
"""
3840

3941
def __init__(self, cb_value_dict, mech):
40-
""" The (generic) base class takes a cb_value_dictionary of
42+
"""
43+
The (generic) base class takes a cb_value_dictionary of
4144
question-answer pairs. Questions are specified by the respective
4245
SASL callback id's. The mech argument is a string that specifies
43-
the SASL mechaninsm to be uesd."""
46+
the SASL mechaninsm to be uesd.
47+
"""
4448
self.cb_value_dict = cb_value_dict or {}
4549
self.mech = mech
4650

4751
def callback(self, cb_id, challenge, prompt, defresult):
48-
""" The callback method will be called by the sasl_bind_s()
52+
"""
53+
The callback method will be called by the sasl_bind_s()
4954
method several times. Each time it will provide the id, which
5055
tells us what kind of information is requested (the CB_ ...
5156
constants above). The challenge might be a short (english) text
@@ -58,7 +63,8 @@ def callback(self, cb_id, challenge, prompt, defresult):
5863
cb_value_dictionary. Note that the current callback interface is not very
5964
useful for writing generic sasl GUIs, which would need to know all
6065
the questions to ask, before the answers are returned to the sasl
61-
lib (in contrast to one question at a time)."""
66+
lib (in contrast to one question at a time).
67+
"""
6268

6369
# The following print command might be useful for debugging
6470
# new sasl mechanisms. So it is left here
@@ -76,7 +82,9 @@ def callback(self, cb_id, challenge, prompt, defresult):
7682

7783

7884
class cram_md5(sasl):
79-
"""This class handles SASL CRAM-MD5 authentication."""
85+
"""
86+
This class handles SASL CRAM-MD5 authentication.
87+
"""
8088

8189
def __init__(self, authc_id, password, authz_id=""):
8290
auth_dict = {
@@ -88,7 +96,9 @@ def __init__(self, authc_id, password, authz_id=""):
8896

8997

9098
class digest_md5(sasl):
91-
"""This class handles SASL DIGEST-MD5 authentication."""
99+
"""
100+
This class handles SASL DIGEST-MD5 authentication.
101+
"""
92102

93103
def __init__(self, authc_id, password, authz_id=""):
94104
auth_dict = {
@@ -100,16 +110,19 @@ def __init__(self, authc_id, password, authz_id=""):
100110

101111

102112
class gssapi(sasl):
103-
"""This class handles SASL GSSAPI (i.e. Kerberos V)
104-
authentication."""
113+
"""
114+
This class handles SASL GSSAPI (i.e. Kerberos V) authentication.
115+
"""
105116

106117
def __init__(self, authz_id=""):
107118
sasl.__init__(self, {CB_USER: authz_id}, "GSSAPI")
108119

109120

110121
class external(sasl):
111-
"""This class handles SASL EXTERNAL authentication
112-
(i.e. X.509 client certificate)"""
122+
"""
123+
This class handles SASL EXTERNAL authentication
124+
(i.e. X.509 client certificate)
125+
"""
113126

114127
def __init__(self, authz_id=""):
115128
sasl.__init__(self, {CB_USER: authz_id}, "EXTERNAL")

0 commit comments

Comments
 (0)