def _get_exception_key(exc_info):
    """ Returns unique string key for exception.

    Key is filename + lineno of exception raise.
    """
    exc_tb = exc_info[2]

    if exc_tb is None:
        return repr(exc_info[1])

    return "{}:{}".format(exc_tb.tb_frame.f_code.co_filename,
                          exc_tb.tb_lineno)