def parse_hours_flag(args):
    """ If the `--hours` flag was used, get the time, and remove 
        the flag and the time from the args list.
        Return FALSE if the flag was not present.
    """
    try:
        pos = args.index('--hours')
    except __HOLE__:
        return False
    else:
        hours = args[pos + 1]
        try:
            hours = float(hours)
        except ValueError:
            fprintf("GITIME ERROR: %s is not a valid amount of hours. Your "
                "commit was NOT made. Try again." %hours, file=sys.stderr)
            sys.exit()
        else:
            del args[pos + 1]
            del args[pos]
            return hours
dataset/ETHPy150Open jongoodnow/gitime/gitime/commit.py/parse_hours_flag