Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix valid values causing program to exit. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wizconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def main():
logger.info("mac_addr:", len(mac_addr), mac_addr)
mac_addr = "00:08:DC:" + mac_addr

if wiz752cmdObj.isvalidparameter("MC", mac_addr) is not False:
if not wiz752cmdObj.isvalidparameter("MC", mac_addr):
logger.info("Invalid Mac address!\r\n")
sys.exit(0)

Expand All @@ -521,7 +521,7 @@ def main():
setcmd_cmd = list(setcmd.keys())
for i in range(len(setcmd)):
# logger.info('%r , %r' % (setcmd_cmd[i], setcmd.get(setcmd_cmd[i])))
if wiz752cmdObj.isvalidparameter(setcmd_cmd[i], setcmd.get(setcmd_cmd[i])) is not False:
if not wiz752cmdObj.isvalidparameter(setcmd_cmd[i], setcmd.get(setcmd_cmd[i])):
logger.info(f"{'#' * 25}\nInvalid parameter: {setcmd.get(setcmd_cmd[i])} \nPlease refer to {sys.argv[0]} -h\r\n")
sys.exit(0)

Expand All @@ -540,7 +540,7 @@ def main():
if args.multiset:
host_ip = args.multiset
# logger.info('Host ip: %s\n' % host_ip)
if wiz752cmdObj.isvalidparameter("LI", host_ip) is not False:
if not wiz752cmdObj.isvalidparameter("LI", host_ip):
logger.info("Invalid IP address!\r\n")
sys.exit(0)

Expand Down