<s> import dns . exception <EOL> class DHCID ( dns . rdata . Rdata ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = [ '<STR_LIT:data>' ] <EOL> def __init__ ( self , rdclass , rdtype , data ) : <EOL> super ( DHCID , self ) . __init__ ( rdclass , rdtype ) <EOL> self . data = data <EOL> def to_text ( self , origin = None , relativize = True , ** kw ) : <EOL> return dns . rdata . _base64ify ( self . data ) <EOL> def from_text ( cls , rdclass , rdtype , tok , origin = None , relativize = True ) : <EOL> chunks = [ ] <EOL> while <NUM_LIT:1> : <EOL> t = tok . get ( ) . unescape ( ) <EOL> if t . is_eol_or_eof ( ) : <EOL> break <EOL> if not t . is_identifier ( ) : <EOL> raise dns . exception . SyntaxError <EOL> chunks . append ( t . value ) <EOL> b64 = '<STR_LIT>' . join ( chunks ) <EOL> data = b64 . decode ( '<STR_LIT>' ) <EOL> return cls ( rdclass , rdtype , data ) <EOL> from_text = classmethod ( from_text ) <EOL> def to_wire ( self , file , compress = None , origin = None ) : <EOL> file . write ( self . data ) <EOL> def from_wire ( cls , rdclass , rdtype , wire , current , rdlen , origin = None ) : <EOL> data = wire [ current : current + rdlen ] . unwrap ( ) <EOL> return cls ( rdclass , rdtype , data ) <EOL> from_wire = classmethod ( from_wire ) </s>
