Skip to content

Commit 32e8f11

Browse files
committed
removed old pngs and added view-blop png. Moved disconnect into a finally block
1 parent 17dfe4c commit 32e8f11

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

articles/iot-hub/iot-hub-python-python-file-upload.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,18 @@ In this section, you create the device app to upload a file to IoT hub.
144144
storage_info["correlationId"], False, result.status_code, str(result)
145145
)
146146
147-
# Finally, disconnect the client
148-
await device_client.disconnect()
149-
150147
except Exception as ex:
151148
print("\nException:")
152149
print(ex)
153150
154151
except KeyboardInterrupt:
155152
print ( "\nIoTHubDeviceClient sample stopped" )
156153
154+
finally:
155+
# Finally, disconnect the client
156+
await device_client.disconnect()
157+
158+
157159
if __name__ == "__main__":
158160
asyncio.run(main())
159161
#loop = asyncio.get_event_loop()
@@ -185,7 +187,7 @@ Now you're ready to run the application.
185187
186188
3. You can use the portal to view the uploaded file in the storage container you configured:
187189
188-
![Uploaded file](./media/iot-hub-python-python-file-upload/2.png)
190+
![Uploaded file](./media/iot-hub-python-python-file-upload/view-blob.png)
189191
190192
## Next steps
191193
Binary file not shown.
Binary file not shown.
32 KB
Loading

0 commit comments

Comments
 (0)