#NEWLINE# def from_text( cls , rdclass , rdtype , tok , origin = None , relativize = True ) : #NEWLINE# #INDENT# type_covered = dns . rdatatype . from_text ( tok . get_string ( ) ) #NEWLINE# algorithm = dns . dnssec . algorithm_from_text ( tok . get_string ( ) ) #NEWLINE# labels = tok . get_int ( ) #NEWLINE# original_ttl = tok . get_ttl ( ) #NEWLINE# expiration = sigtime_to_posixtime ( tok . get_string ( ) ) #NEWLINE# inception = sigtime_to_posixtime ( tok . get_string ( ) ) #NEWLINE# key_tag = tok . get_int ( ) #NEWLINE# signer = tok . get_name ( ) #NEWLINE# signer = signer . choose_relativity ( origin , relativize ) #NEWLINE# chunks = [ ] #NEWLINE# while 1 : #NEWLINE# #INDENT# t = tok . get ( ) . unescape ( ) #NEWLINE# if t . is_eol_or_eof ( ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( not t . is_identifier ( ) ) : #NEWLINE# #INDENT# raise dns . exception . SyntaxError #NEWLINE# #UNINDENT# chunks . append ( t . value ) #NEWLINE# #UNINDENT# b64 = '' . join ( chunks ) #NEWLINE# signature = b64 . decode ( 'base64_codec' ) #NEWLINE# return cls ( rdclass , rdtype , b64 , algorithm , labels , original_ttl , expiration , inception , key_tag , signer , signature )