Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions iot/api-client/mqtt_example/cloudiot_mqtt_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import jwt
import paho.mqtt.client as mqtt


# [START iot_mqtt_jwt]
def create_jwt(project_id, private_key_file, algorithm):
"""Creates a JWT (https://jwt.io) to establish an MQTT connection.
Args:
Expand Down Expand Up @@ -62,7 +62,7 @@ def create_jwt(project_id, private_key_file, algorithm):
algorithm, private_key_file))

return jwt.encode(token, private_key, algorithm=algorithm)

# [END iot_mqtt_jwt]

def error_str(rc):
"""Convert a Paho error to a human readable string."""
Expand Down