IoTReady / aws_iot_demo

Use of exit() or quit() detected PYL-R1722
Bug risk
Major
a year agoa year old
Consider using sys.exit()
47
48    if useWebsocket and certificatePath and privateKeyPath:
49        print("X.509 cert authentication and WebSocket are mutual exclusive. Please pick one.")
50        exit(2)51
52    if not useWebsocket and (not certificatePath or not privateKeyPath):
53        print("Missing credentials for authentication.")
Consider using sys.exit()
51
52    if not useWebsocket and (not certificatePath or not privateKeyPath):
53        print("Missing credentials for authentication.")
54        exit(2)55
56    # Port defaults
57    if useWebsocket and not port:  # When no port override for WebSocket, default to 443