Skip to content

Commit b26dc2f

Browse files
author
morsesfeeler@live.ru
committed
Exit in voice webhook deletion example, if result is empty
1 parent 02eede0 commit b26dc2f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/voice_list_webhook.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
webhooks_list = client.voice_list_webhooks(limit=5, offset=0)
1515

16+
if webhooks_list is None or webhooks_list.data is None:
17+
print("\nNo webhooks\n")
18+
exit(0)
1619
# Print the object information.
1720
print('\nThe following information was returned as a Voice Webhook objects:\n')
1821
for webhook in webhooks_list.data:

0 commit comments

Comments
 (0)