@classmethod
  def __GetSignature(cls, exc_info):
    """Returns a unique signature string for an exception.

    Args:
      exc_info: The exc_info object for an exception.

    Returns:
      A unique signature string for the exception, consisting of fully
      qualified exception name and call site.
    """
    ex_type, unused_value, trace = exc_info
    frames = traceback.extract_tb(trace)

    fulltype = '%s.%s' % (ex_type.__module__, ex_type.__name__)
    path, line_no = frames[-1][:2]
    path = cls.__RelativePath(path)
    site = '%s:%d' % (path, line_no)
    signature = '%s@%s' % (fulltype, site)
    if len(signature) > MAX_SIGNATURE_LENGTH:
      signature = 'hash:%s' % sha.new(signature).hexdigest()

    return signature
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ereporter/ereporter.py/ExceptionRecordingHandler.__GetSignature/original