Mercurial > hg > nsaunier > traffic-intelligence
comparison trafficintelligence/storage.py @ 1182:0e5d37b0b9ff
bug corrections
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 01 Apr 2022 15:33:22 -0400 |
| parents | ee3eaf902b83 |
| children | ccab20f85710 |
comparison
equal
deleted
inserted
replaced
| 1181:b3b1a5dfa17c | 1182:0e5d37b0b9ff |
|---|---|
| 540 interactions[-1].indicators = {} | 540 interactions[-1].indicators = {} |
| 541 if indicatorTypeNum != row[5] or row[0] != interactionNum: | 541 if indicatorTypeNum != row[5] or row[0] != interactionNum: |
| 542 indicatorTypeNum = row[5] | 542 indicatorTypeNum = row[5] |
| 543 indicatorName = events.Interaction.indicatorNames[indicatorTypeNum] | 543 indicatorName = events.Interaction.indicatorNames[indicatorTypeNum] |
| 544 indicatorValues = {row[6]:row[7]} | 544 indicatorValues = {row[6]:row[7]} |
| 545 interactions[-1].indicators[indicatorName] = indicators.SeverityIndicator(indicatorName, indicatorValues, mostSevereIsMax = not indicatorName in events.Interaction.timeIndicators) | 545 interactions[-1].indicators[indicatorName] = indicators.SeverityIndicator(indicatorName, indicatorValues, mostSevereIsMax = not indicatorName in events.Interaction.mostSevereIsMinIndicators) |
| 546 else: | 546 else: |
| 547 indicatorValues[row[6]] = row[7] | 547 indicatorValues[row[6]] = row[7] |
| 548 interactions[-1].indicators[indicatorName].timeInterval.last = row[6] | 548 interactions[-1].indicators[indicatorName].timeInterval.last = row[6] |
| 549 except sqlite3.OperationalError as error: | 549 except sqlite3.OperationalError as error: |
| 550 printDBError(error) | 550 printDBError(error) |
