Mercurial Hosting > traffic-intelligence
diff python/sumo.py @ 965:eec549e9ff2e
removed bug
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 05 Dec 2017 11:52:59 -0500 |
parents | e3ec6caab984 |
children | 40af0f20ee2d |
line wrap: on
line diff
--- a/python/sumo.py Mon Nov 27 17:23:30 2017 -0500 +++ b/python/sumo.py Tue Dec 05 11:52:59 2017 -0500 @@ -21,7 +21,11 @@ for edge in datum[15:]: if len(edge) > 0: if edge is not None: - tazs.setdefault(tazID, [edge]).append(edge) + if tazID in tazs: + if edge not in tazs[tazID]: + tazs[tazID].append(edge) + else: + tazs[tazID] = [edge] with open(outFilename,'w') as out: out.write('<tazs>\n')