Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Dec 22, 2023
1 parent 65dce01 commit e85102f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions servicetests/tests/FleetProvisioning/fleet_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def on_lifecycle_stopped(lifecycle_stopped_data: mqtt5.LifecycleStoppedData):

mqtt5_client.start()

jobs_client = iotjobs.IotJobsClient(mqtt5_client)
identity_client = iotidentity.IotIdentityClient(mqtt5_client)

future_connection_success.result()

elif cmdData.input_mqtt_version == 3:
Expand All @@ -299,6 +300,11 @@ def on_lifecycle_stopped(lifecycle_stopped_data: mqtt5.LifecycleStoppedData):
clean_session=False,
keep_alive_secs=30,
http_proxy_options=proxy_options)
print(f"Connecting to {cmdData.input_endpoint} with client ID '{cmdData.input_clientId}' with MQTT5...")

connected_future = mqtt_connection.connect()

identity_client = iotidentity.IotIdentityClient(mqtt_connection)
else:
print("Unsopported MQTT version number\n")
sys.exit(-1)
Expand All @@ -309,9 +315,6 @@ def on_lifecycle_stopped(lifecycle_stopped_data: mqtt5.LifecycleStoppedData):
else:
print("Connecting to endpoint with client ID")

connected_future = mqtt_connection.connect()

identity_client = iotidentity.IotIdentityClient(mqtt_connection)

# Wait for connection to be fully established.
# Note that it's not necessary to wait, commands issued to the
Expand Down

0 comments on commit e85102f

Please sign in to comment.