def checkValidPort(value):
    ivalue = int(value)
    if ((ivalue < 0) or (ivalue > 65535)):
        raise argparse.ArgumentTypeError(('%s is not a valid port' % value))
    return value
def checkValidPort(value):
    ivalue = int(value)
    if ((ivalue < 0) or (ivalue > 65535)):
        raise argparse.ArgumentTypeError(('%s is not a valid port' % value))
    return value