Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0acc792

Browse filesBrowse files
authored
Fixes bug from refactor (GoogleCloudPlatform#2050)
1 parent de9fd87 commit 0acc792
Copy full SHA for 0acc792

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎iot/api-client/codelabs/ledlight.py

Copy file name to clipboardExpand all lines: iot/api-client/codelabs/ledlight.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def make_message(device_id, action, data=''):
4444
return '{{ "device" : "{}", "action":"{}" }}'.format(device_id, action)
4545

4646

47-
def run_action(action, data=''):
47+
def run_action(device_id, action, data=''):
4848
message = make_message(device_id, action, data)
4949
if not message:
5050
return
@@ -61,10 +61,10 @@ def main():
6161

6262
print('Bringing up device {}'.format(device_id))
6363
try:
64-
run_action('detach')
65-
run_action('attach')
66-
run_action('event', 'LED is online')
67-
run_action('subscribe')
64+
run_action(device_id, 'detach')
65+
run_action(device_id, 'attach')
66+
run_action(device_id, 'event', 'LED is online')
67+
run_action(device_id, 'subscribe')
6868

6969
while True:
7070
response = client_sock.recv(BUFF_SIZE)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.