#NEWLINE# def m2i( self , pkt , s ) : #NEWLINE# #INDENT# ret_s = '' #NEWLINE# tmp_s = s #NEWLINE# while tmp_s : #NEWLINE# #INDENT# tmp_len = ( struct . unpack ( '!B' , tmp_s [ 0 ] ) [ 0 ] + 1 ) #NEWLINE# if ( tmp_len > len ( tmp_s ) ) : #NEWLINE# #INDENT# warning ( ( 'APN prematured end of character-string (size=%i, remaining bytes=%i)' % ( tmp_len , len ( tmp_s ) ) ) ) #NEWLINE# #UNINDENT# ret_s += tmp_s [ 1 : tmp_len ] #NEWLINE# tmp_s = tmp_s [ tmp_len : ] #NEWLINE# if len ( tmp_s ) : #NEWLINE# #INDENT# ret_s += '.' #NEWLINE# #UNINDENT# #UNINDENT# s = ret_s #NEWLINE# return s