def _split_mime_type(mime_type):
 if mime_type:
  match = _MIME_PATTERN.match(mime_type)
  if (not match):
   raise _InvalidMIMETypeFormatError(('Incorrectly formatted MIME type: %s' % mime_type))
  return match.groups()
 else:
  return ('application', 'octet-stream')

def _split_mime_type ( mime_type ) : if mime_type : match = _MIME_PATTERN . match ( mime_type ) if ( not match ) : raise _InvalidMIMETypeFormatError ( ( 'Incorrectly formatted MIME type: %s' % mime_type ) ) return match . groups ( ) else : return ( 'application' , 'octet-stream' )
split mime type into main type and subtype .