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 8ade7dd

Browse filesBrowse files
authored
Fix list devices in IoT sample (GoogleCloudPlatform#2319)
1 parent 4e44c60 commit 8ade7dd
Copy full SHA for 8ade7dd

File tree

Expand file treeCollapse file tree

1 file changed

+2
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-11
lines changed

‎iot/api-client/manager/manager.py

Copy file name to clipboardExpand all lines: iot/api-client/manager/manager.py
+2-11Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -704,17 +704,8 @@ def list_devices_for_gateway(
704704
device.get('numId'),
705705
device.get('id')))
706706

707-
if devices.get('deviceNumIds') is not None:
708-
for device_id in devices.get('deviceNumIds'):
709-
device_name = '{}/devices/{}'.format(
710-
registry_name, device_id)
711-
device = client.projects().locations().registries().devices().get(
712-
name=device_name).execute()
713-
print('Id: {}\n\tName: {}\n\traw: {}'.format(
714-
device_id, device.get('id'), device))
715-
else:
716-
if not found:
717-
print('No devices bound to gateway {}'.format(gateway_id))
707+
if not found:
708+
print('No devices bound to gateway {}'.format(gateway_id))
718709
# [END iot_list_devices_for_gateway]
719710

720711

0 commit comments

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