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()