#NEWLINE# def _guess_content_type( filename ) : #NEWLINE# #INDENT# if filename : #NEWLINE# #INDENT# guessed = mimetypes . guess_type ( filename ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# guessed = None #NEWLINE# #UNINDENT# return ( guessed or 'application/octet-stream' )