Skip to content

Commit

Permalink
Merge pull request #314 from lilchurro/bug/313
Browse files Browse the repository at this point in the history
Fixes Bug/313
  • Loading branch information
lilchurro authored Mar 8, 2019
2 parents 2b0f3dd + 3fc9e2d commit 278a74b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions utils/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,10 @@ def sessionizer(path, duration=None, threshold_time=None):
session_starts = OrderedDict()

# Get threshold time from config
if threshold_time is None:
# TODO: error-check threshold_time, if < 0
# error-check all config parameters, as well.
config = get_config()
threshold_time = config.get('session threshold', 120)
config = get_config()
if not threshold_time or threshold_time < 1:
cfg_threshold = config.get('session threshold')
threshold_time = cfg_threshold if cfg_threshold and cfg_threshold>0 else 120

for head, packet in packet_dict.items():
time = head[0]
Expand Down

0 comments on commit 278a74b

Please sign in to comment.