def split_name(name):
    """Splits a (possibly versioned) name into unversioned name and version.

       Returns a tuple ``(unversioned_name, version)``, where ``version`` may
       be ``None``.
    """
    s = name.rsplit('@', 1)
    if len(s) == 1:
        return s[0], None
    else:
        try:
            return s[0], int(s[1])
        except ValueError:
            raise ValueError("Invalid Filetracker filename: version must "
                             "be int, not %r" % (s[1],))
Splits a (possibly versioned) name into unversioned name and version.

       Returns a tuple ``(unversioned_name, version)``, where ``version`` may
       be ``None``.