From: Michael Mattioli Date: Tue, 15 Jul 2014 16:48:58 +0000 (-0400) Subject: Improve indentation of t_otp.py X-Git-Tag: krb5-1.13-alpha1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0db9cc6b01f979089aca324cccca7ee8cff62dc3;p=thirdparty%2Fkrb5.git 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] --- diff --git a/src/tests/t_otp.py b/src/tests/t_otp.py index 0aeb692e46..e114f03b9d 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()