Mercurial Hosting > traffic-intelligence
changeset 552:ca6bded754ac
corrected more bugs from merging (caught in regression tests)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 08 Jul 2014 17:04:55 -0400 |
parents | dc3739ac2371 |
children | 3622a5653ee9 |
files | python/moving.py python/storage.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/moving.py Tue Jul 08 16:59:35 2014 -0400 +++ b/python/moving.py Tue Jul 08 17:04:55 2014 -0400 @@ -637,7 +637,7 @@ def __init__(self, S = None, Y = None, lanes = None): if S == None or Y == None or len(S) != len(Y): self.positions = [[],[]] - if len(S) != len(Y): + if S != None and Y != None and len(S) != len(Y): print("S and Y coordinates of different lengths\nInitializing to empty lists") else: self.positions = [S,Y]
--- a/python/storage.py Tue Jul 08 16:59:35 2014 -0400 +++ b/python/storage.py Tue Jul 08 17:04:55 2014 -0400 @@ -65,7 +65,7 @@ connection.close() def writeFeaturesToSqlite(objects, outFilename, trajectoryType, objectNumbers = -1): - '''write features trajectories maintain trajectory ID,velocities dataset ''' + '''write features trajectories maintain trajectory ID,velocities dataset ''' connection = sqlite3.connect(outFilename) cursor = connection.cursor()