@@ -240,7 +240,7 @@ def listen_for_messages(
240
240
241
241
seconds_since_issue = (datetime .datetime .utcnow () - jwt_iat ).seconds
242
242
if seconds_since_issue > 60 * jwt_exp_mins :
243
- print ('Refreshing token after {}s' ) .format (seconds_since_issue )
243
+ print ('Refreshing token after {}s' .format (seconds_since_issue ) )
244
244
jwt_iat = datetime .datetime .utcnow ()
245
245
client = get_client (
246
246
project_id , cloud_region , registry_id , gateway_id ,
@@ -284,7 +284,7 @@ def send_data_from_bound_device(
284
284
print (gateway_state )
285
285
client .publish (gateway_topic , gateway_state , qos = 1 )
286
286
287
- # Publish num_messages mesages to the MQTT bridge
287
+ # Publish num_messages messages to the MQTT bridge
288
288
for i in range (1 , num_messages + 1 ):
289
289
client .loop ()
290
290
@@ -336,7 +336,7 @@ def parse_command_line_args():
336
336
parser .add_argument (
337
337
'--ca_certs' ,
338
338
default = 'roots.pem' ,
339
- help = ( 'CA root from https://pki.google.com/roots.pem' ) )
339
+ help = 'CA root from https://pki.google.com/roots.pem' )
340
340
parser .add_argument (
341
341
'--cloud_region' , default = 'us-central1' , help = 'GCP cloud region' )
342
342
parser .add_argument (
@@ -351,7 +351,7 @@ def parse_command_line_args():
351
351
'--jwt_expires_minutes' ,
352
352
default = 20 ,
353
353
type = int ,
354
- help = ( 'Expiration time, in minutes, for JWT tokens.' ) )
354
+ help = 'Expiration time, in minutes, for JWT tokens.' )
355
355
parser .add_argument (
356
356
'--listen_dur' ,
357
357
default = 60 ,
@@ -429,7 +429,7 @@ def mqtt_device_demo(args):
429
429
args .device_id , args .private_key_file , args .algorithm ,
430
430
args .ca_certs , args .mqtt_bridge_hostname , args .mqtt_bridge_port )
431
431
432
- # Publish num_messages mesages to the MQTT bridge once per second.
432
+ # Publish num_messages messages to the MQTT bridge once per second.
433
433
for i in range (1 , args .num_messages + 1 ):
434
434
# Process network events.
435
435
client .loop ()
@@ -455,7 +455,7 @@ def mqtt_device_demo(args):
455
455
# [START iot_mqtt_jwt_refresh]
456
456
seconds_since_issue = (datetime .datetime .utcnow () - jwt_iat ).seconds
457
457
if seconds_since_issue > 60 * jwt_exp_mins :
458
- print ('Refreshing token after {}s' ) .format (seconds_since_issue )
458
+ print ('Refreshing token after {}s' .format (seconds_since_issue ) )
459
459
jwt_iat = datetime .datetime .utcnow ()
460
460
client = get_client (
461
461
args .project_id , args .cloud_region ,
0 commit comments