Skip to content

Commit 8e62b4f

Browse files
author
Peter Armstrong
committed
fix checking for username and password
1 parent d2f4688 commit 8e62b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mqtt-all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def main():
200200
)
201201

202202
mqtt_client = mqtt.Client(client_id=device_id)
203-
if username and password:
203+
if args.username and args.password:
204204
mqtt_client.username_pw_set(args.username, args.password)
205205
mqtt_client.on_connect = on_connect
206206
mqtt_client.on_publish = on_publish

0 commit comments

Comments
 (0)