From 1c23992b1b8721f4922611bb266ca8ea11ecf331 Mon Sep 17 00:00:00 2001 From: stroeder Date: Sun, 19 Nov 2017 00:12:30 +0000 Subject: [PATCH] docstring line-wrapping --- Lib/ldap/sasl.py | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/Lib/ldap/sasl.py b/Lib/ldap/sasl.py index d67153d..34d4cb0 100644 --- a/Lib/ldap/sasl.py +++ b/Lib/ldap/sasl.py @@ -30,22 +30,27 @@ class sasl: - """This class handles SASL interactions for authentication. + """ + This class handles SASL interactions for authentication. If an instance of this class is passed to ldap's sasl_bind_s() method, the library will call its callback() method. For specific SASL authentication mechanisms, this method can be - overridden""" + overridden + """ def __init__(self, cb_value_dict, mech): - """ The (generic) base class takes a cb_value_dictionary of + """ + The (generic) base class takes a cb_value_dictionary of question-answer pairs. Questions are specified by the respective SASL callback id's. The mech argument is a string that specifies - the SASL mechaninsm to be uesd.""" + the SASL mechaninsm to be uesd. + """ self.cb_value_dict = cb_value_dict or {} self.mech = mech def callback(self, cb_id, challenge, prompt, defresult): - """ The callback method will be called by the sasl_bind_s() + """ + The callback method will be called by the sasl_bind_s() method several times. Each time it will provide the id, which tells us what kind of information is requested (the CB_ ... constants above). The challenge might be a short (english) text @@ -58,7 +63,8 @@ def callback(self, cb_id, challenge, prompt, defresult): cb_value_dictionary. Note that the current callback interface is not very 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).""" + 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 @@ -76,7 +82,9 @@ def callback(self, cb_id, challenge, prompt, defresult): class cram_md5(sasl): - """This class handles SASL CRAM-MD5 authentication.""" + """ + This class handles SASL CRAM-MD5 authentication. + """ def __init__(self, authc_id, password, authz_id=""): auth_dict = { @@ -88,7 +96,9 @@ def __init__(self, authc_id, password, authz_id=""): class digest_md5(sasl): - """This class handles SASL DIGEST-MD5 authentication.""" + """ + This class handles SASL DIGEST-MD5 authentication. + """ def __init__(self, authc_id, password, authz_id=""): auth_dict = { @@ -100,16 +110,19 @@ def __init__(self, authc_id, password, authz_id=""): class gssapi(sasl): - """This class handles SASL GSSAPI (i.e. Kerberos V) - authentication.""" + """ + This class handles SASL GSSAPI (i.e. Kerberos V) authentication. + """ def __init__(self, authz_id=""): sasl.__init__(self, {CB_USER: authz_id}, "GSSAPI") class external(sasl): - """This class handles SASL EXTERNAL authentication - (i.e. X.509 client certificate)""" + """ + This class handles SASL EXTERNAL authentication + (i.e. X.509 client certificate) + """ def __init__(self, authz_id=""): sasl.__init__(self, {CB_USER: authz_id}, "EXTERNAL")