@classmethod
def parse_filename(cls, fname):
    """
        Parse the filename and returns (name, attempt).
        When using old style paths (pre-attempt id), returns
        (name=fname, attempt=None).
        This is expected to be the converse to
        filename_with_attempt_prefix() method.
        """
    if len(fname) >= 1 and fname[0] >= '0' and fname[0] <= '9':
        attempt = int(fname[0])
        name = fname[2:]
    else:
        attempt = None
        name = fname
    return name, attempt
