From afb320685fb392b23d0bea83e4728dd07539ae43 Mon Sep 17 00:00:00 2001 From: Noah Beard Date: Tue, 11 Oct 2022 09:18:34 -0400 Subject: [PATCH] Fix the non-CLI code path for Shadow sample --- samples/README.md | 2 +- samples/shadow.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/README.md b/samples/README.md index 902ce823..8c4748a5 100644 --- a/samples/README.md +++ b/samples/README.md @@ -375,7 +375,7 @@ Source: `samples/shadow.py` Run the sample like this: ``` sh # For Windows: replace 'python3' with 'python' -python3 shadow.py --endpoint --ca_file --cert --key --thing-name +python3 shadow.py --endpoint --ca_file --cert --key --thing_name ``` Your Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html) must provide privileges for this sample to connect, subscribe, publish, and receive. Make sure your policy allows a client ID of `test-*` to connect or use `--client_id ` to send the client ID your policy supports. diff --git a/samples/shadow.py b/samples/shadow.py index 6fc42377..4d6a4308 100644 --- a/samples/shadow.py +++ b/samples/shadow.py @@ -295,8 +295,8 @@ def user_input_thread_fn(): try: messages_sent = 0 while messages_sent < 5: - input = "Shadow_Value_" + str(messages_sent) - change_shadow_value(input) + cli_input = "Shadow_Value_" + str(messages_sent) + change_shadow_value(cli_input) sleep(1) messages_sent += 1 exit("CI has quit")