def parse_accept_header(self, accept):
        media_types = []
        for media_type in accept.split(','):
            try:
                media_types.append(MediaType(media_type))
            except __HOLE__:
                pass
        return media_types
dataset/ETHPy150Open mollyproject/mollyproject/molly/utils/views.py/BaseView.parse_accept_header