#NEWLINE# def construct_yaml_binary( self , node ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# value = self . construct_scalar ( node ) . encode ( 'ascii' ) #NEWLINE# #UNINDENT# except UnicodeEncodeError as exc : #NEWLINE# #INDENT# raise ConstructorError ( None , None , ( 'failed to convert base64 data into ascii: %s' % exc ) , node . start_mark ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if hasattr ( base64 , 'decodebytes' ) : #NEWLINE# #INDENT# return base64 . decodebytes ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return base64 . decodestring ( value ) #NEWLINE# #UNINDENT# #UNINDENT# except binascii . Error as exc : #NEWLINE# #INDENT# raise ConstructorError ( None , None , ( 'failed to decode base64 data: %s' % exc ) , node . start_mark )