#NEWLINE# def transcode_fs( self , fs , content_type ) : #NEWLINE# #INDENT# if PY3 : #NEWLINE# #INDENT# decode = ( lambda b : b ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# decode = ( lambda b : b . decode ( self . charset , self . errors ) ) #NEWLINE# #UNINDENT# data = [ ] #NEWLINE# for field in ( fs . list or ( ) ) : #NEWLINE# #INDENT# field . name = decode ( field . name ) #NEWLINE# if field . filename : #NEWLINE# #INDENT# field . filename = decode ( field . filename ) #NEWLINE# data . append ( ( field . name , field ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data . append ( ( field . name , decode ( field . value ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# ( content_type , fout ) = _encode_multipart ( data , content_type , fout = io . BytesIO ( ) ) #NEWLINE# return fout