args.delay = params["delay"] ################################# # VALIDATION # ################################# #create a new Validator and validate Params validator = Validator() if args.endurance is not None: if validator.validate_endurance(args.endurance): endurance = int(args.endurance) #validate replysize if args.reply_size is not None: validator.validate_repsize(int(args.reply_size)) repsize = args.reply_size #validate and set Port if args.port is not None: validator.validate_port(int(args.port)) port = args.port #validate and set type if args.type is not None: validator.validate_type(args.type) type = args.type #validate and set size if args.size is not None: validator.validate_size(int(args.size))