We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeaad17 commit d2f4688Copy full SHA for d2f4688
examples/mqtt-all.py
@@ -200,7 +200,8 @@ def main():
200
)
201
202
mqtt_client = mqtt.Client(client_id=device_id)
203
- mqtt_client.username_pw_set(args.username, args.password)
+ if username and password:
204
+ mqtt_client.username_pw_set(args.username, args.password)
205
mqtt_client.on_connect = on_connect
206
mqtt_client.on_publish = on_publish
207
mqtt_client.connect(args.broker, port=args.port)
0 commit comments