def str_int(v):
    """Handle argparse inputs to that could be str or int

    :param v: value to convert
    :return: v as int if int(v) does not raise ValueError

    >>> str_int('test')
    test
    >>> str_int(1)
    1
    """
    try:
        int_v = int(v)
        return int_v
    except ValueError:
        return v
