<div dir="ltr">Hi,<br>There is a bug when a $INCLUDE is use in the dict file of the radiusclient-ng.<br>If I concatenate all my dict in one bigger, all is ok.<br>I try to make a fonction who handle the $INCLUDE :<br>class RadiusDictionaryFile(object):<br>
<i> def __init__(self, base_file_name):<br> self.file_names = [base_file_name]<br> log.warn(base_file_name)<br> self.fd_stack = [open(base_file_name)]<br><br> def readlines(self):<br> i=-1<br>
while i<len(self.fd_stack)-1:<br> line = self.fd_stack[i].readline()<br> if line:<br> if line.startswith("$INCLUDE"):<br> file_name = line.rstrip("\n").split(None, 1)[1]<br>
if file_name not in self.file_names:<br> self.file_names.append(file_name)<br> self.fd_stack.append(open(file_name))<br> continue<br> else:<br>
yield line<br> else:<br> self.fd_stack.pop()<br> if len(self.fd_stack) == 0:<br> return<br> i=i+1</i><br clear="all"><br><br>Let me know if this is correct for you.<br>
Have a nice day.<br><br>-- <br>Geoffroy Rabouin<br>HighColoc<br>13710 La Barque<br>FRANCE<br>téléphone : +33 6-27-19-13-07<br clear="all"><br>-- <br>Geoffroy Rabouin<br>HighColoc<br>13710 La Barque<br>téléphone : 06-27-19-13-07<br>
</div>