[28460] in CVS-changelog-for-Kerberos-V5
krb5 commit: Improve indentation of t_otp.py
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Jul 15 14:55:02 2014
Date: Tue, 15 Jul 2014 14:54:51 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201407151854.s6FIspP9028194@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/0db9cc6b01f979089aca324cccca7ee8cff62dc3
commit 0db9cc6b01f979089aca324cccca7ee8cff62dc3
Author: Michael Mattioli <mattiolimichael@gmail.com>
Date: Tue Jul 15 12:48:58 2014 -0400
Improve indentation of t_otp.py
Move the RADIUS attribute dictionary text to a global variable defined
at indent level 0, so that we don't go back to indent level 0 in the
middle of the RadiusDaemon class definition.
[ghudson@mit.edu: clarified commit message, moved comment, changed
variable name]
src/tests/t_otp.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/tests/t_otp.py b/src/tests/t_otp.py
index 0aeb692..e114f03 100644
--- a/src/tests/t_otp.py
+++ b/src/tests/t_otp.py
@@ -42,16 +42,17 @@ except ImportError:
success('Warning: skipping OTP tests due to missing pyrad or old Python')
exit(0)
-class RadiusDaemon(Process):
- MAX_PACKET_SIZE = 4096
-
- # We could use a dictionary file, but since we need
- # such few attributes, we'll just include them here
- DICTIONARY = dictionary.Dictionary(StringIO.StringIO("""
+# We could use a dictionary file, but since we need so few attributes,
+# we'll just include them here.
+radius_attributes = '''
ATTRIBUTE User-Name 1 string
ATTRIBUTE User-Password 2 string
ATTRIBUTE NAS-Identifier 32 string
-"""))
+'''
+
+class RadiusDaemon(Process):
+ MAX_PACKET_SIZE = 4096
+ DICTIONARY = dictionary.Dictionary(StringIO.StringIO(radius_attributes))
def listen(self, addr):
raise NotImplementedError()
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5