Skip to content

Commit

Permalink
base: Check for conditions before checking for not_observed (Fixes: #208
Browse files Browse the repository at this point in the history
)
  • Loading branch information
irl committed Jan 15, 2018
1 parent cab3d08 commit bfba9af
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pathspider/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,12 @@ def merge(self, flow, res):
if not flow['observed']:
job['missed_flows'] = job['missed_flows'] + 1
job['conditions'] = self.combine_flows(flows)
if "pathspider.not_observed" in job['conditions']:
self.__logger.debug("At least one flow was not observed and so conditions could not be fully generated (if at all)")
if job['missed_flows'] > 0:
job['conditions'].append("pathspider.missed_flows:" + str(job['missed_flows']))
if job['conditions'] is None:
if job['conditions'] is not None:
if "pathspider.not_observed" in job['conditions']:
self.__logger.debug("At least one flow was not observed and so conditions could not be fully generated (if at all)")
if job['missed_flows'] > 0:
job['conditions'].append("pathspider.missed_flows:" + str(job['missed_flows']))
else:
job.pop('conditions')
self.outqueue.put(job)

Expand Down

0 comments on commit bfba9af

Please sign in to comment.