diff --git a/examples/iothub_recv.py b/examples/iothub_recv.py index dd1f6a5..03b04ae 100644 --- a/examples/iothub_recv.py +++ b/examples/iothub_recv.py @@ -10,9 +10,10 @@ from azure.eventhub import EventData, EventHubClient, Offset import logging +import os logger = logging.getLogger('azure.eventhub') -CONNSTR = os.environ['IOTHUB_CONNECTION_STR'] +iot_connection_str = os.environ['IOTHUB_CONNECTION_STR'] client = EventHubClient.from_iothub_connection_string(iot_connection_str, debug=True) receiver = client.add_receiver("$default", "0", operation='/messages/events')