#NEWLINE# @ data . setter #NEWLINE# def data( self , string ) : #NEWLINE# #INDENT# log . debug ( "parse '{0}' record" . format ( self . type ) ) #NEWLINE# if ( len ( string ) > 0 ) : #NEWLINE# #INDENT# f = io . BytesIO ( string ) #NEWLINE# self . version = Version ( f . read ( 1 ) ) #NEWLINE# if ( self . version . major != 1 ) : #NEWLINE# #INDENT# raise DecodeError ( 'unsupported major version' ) #NEWLINE# #UNINDENT# while ( f . tell ( ) < len ( string ) ) : #NEWLINE# #INDENT# record = Record ( data = f ) #NEWLINE# if ( record . type == 'urn:nfc:wkt:ac' ) : #NEWLINE# #INDENT# carrier = AlternativeCarrier ( self . data ) #NEWLINE# self . carriers . append ( carrier ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( record . type == 'urn:nfc:wkt:err' ) : #NEWLINE# #INDENT# self . error = HandoverError ( record . data ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# s = 'skip unknown local record {0}' #NEWLINE# log . warning ( s . format ( record . type ) )