def parse(self, cli_obj, arg):
        try:
            value = int(arg)
        except __HOLE__:
            return self.__parsePath(cli_obj, arg)

        if value < 0:
            msg = 'file index may not be negative'
            raise cli.CommandArgumentsError(msg)
        if value >= cli_obj.review.getNumEntries():
            msg = 'file index must be less than %s' % \
                    (cli_obj.review.getNumEntries())
            raise cli.CommandArgumentsError(msg)

        return value
dataset/ETHPy150Open facebookarchive/git-review/src/gitreview/review/cli_reviewer.py/FileIndexArgument.parse