@@ -332,14 +332,19 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
332
332
report_data_message = []
333
333
334
334
start_wait_time = time .time ()
335
-
335
+ print ( 'SHAO before parsing for the `ReportDataMessage` block!' )
336
336
while True :
337
337
# Check if we exceeded the maximum wait time to parse the Linux tv-casting-app output for `ReportDataMessage` block.
338
338
if time .time () - start_wait_time > VERIFY_SUBSCRIPTION_STATE_MAX_WAIT_SEC :
339
339
logging .error (
340
340
'The relevant `ReportDataMessage` block was not found in the Linux tv-casting-app process within the timeout.' )
341
- # report_data_message.clear() # SHAO OG
342
- report_data_message = [] # SHAO
341
+
342
+ logging .error ('SHAO debugging when we hit timeout:' )
343
+ for report_data_msg_line in report_data_message :
344
+ logging .error (report_data_msg_line )
345
+
346
+ report_data_message .clear () # SHAO OG
347
+ # report_data_message = [] # SHAO
343
348
return report_data_message
344
349
345
350
tv_casting_line = tv_casting_app_process .stdout .readline ()
@@ -350,22 +355,24 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
350
355
351
356
if 'ReportDataMessage =' in tv_casting_line :
352
357
report_data_message .append (tv_casting_line .rstrip ('\n ' ))
358
+ logging .info (tv_casting_line .rstrip ('\n ' )) # SHAO
353
359
continue_parsing = True
354
360
elif continue_parsing :
355
361
report_data_message .append (tv_casting_line .rstrip ('\n ' ))
362
+ logging .info (tv_casting_line .rstrip ('\n ' )) # SHAO
356
363
357
364
if 'Cluster =' in tv_casting_line :
358
365
cluster_value = extract_value_from_string (tv_casting_line )
359
366
if cluster_value != CLUSTER_MEDIA_PLAYBACK :
360
- # report_data_message.clear() # SHAO OG
361
- report_data_message = [] # SHAO
367
+ report_data_message .clear () # SHAO OG
368
+ # report_data_message = [] # SHAO
362
369
continue_parsing = False
363
370
364
371
elif 'Attribute =' in tv_casting_line :
365
372
attribute_value = extract_value_from_string (tv_casting_line )
366
373
if attribute_value != ATTRIBUTE_CURRENT_PLAYBACK_STATE :
367
- # report_data_message.clear() # SHAO OG
368
- report_data_message = [] # SHAO
374
+ report_data_message .clear () # SHAO OG
375
+ # report_data_message = [] # SHAO
369
376
continue_parsing = False
370
377
371
378
elif 'InteractionModelRevision' in tv_casting_line :
@@ -374,6 +381,7 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
374
381
linux_tv_casting_app_log_file .write (tv_casting_line )
375
382
linux_tv_casting_app_log_file .flush ()
376
383
report_data_message .append (tv_casting_line .rstrip ('\n ' ))
384
+ logging .info (tv_casting_line .rstrip ('\n ' )) # SHAO
377
385
return report_data_message
378
386
379
387
0 commit comments