Skip to content

Commit

Permalink
Added check that srt_packets dataframe is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mbakholdina committed Dec 11, 2019
1 parent f4c360f commit 874cdd5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/get_traffic_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def main(path, overwrite):
)
return

if srt_packets.empty:
print("No SRT packets found.")
return

sec_begin = srt_packets.iloc[0]['ws.time']
sec_end = srt_packets.iloc[-1]['ws.time']
duration_sec = sec_end - sec_begin
Expand Down

0 comments on commit 874cdd5

Please sign in to comment.