Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/storage.py @ 1239:31173c4699d2
minor comment
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 06 Oct 2023 17:02:32 -0400 |
parents | d5695e0b59d9 |
children | ab4c72b9475c |
comparison
equal
deleted
inserted
replaced
1238:b684135d817f | 1239:31173c4699d2 |
---|---|
639 except sqlite3.OperationalError as error: | 639 except sqlite3.OperationalError as error: |
640 printDBError(error) | 640 printDBError(error) |
641 connection.commit() | 641 connection.commit() |
642 | 642 |
643 def loadPrototypeAssignmentsFromSqlite(filename, objectType): | 643 def loadPrototypeAssignmentsFromSqlite(filename, objectType): |
644 '''Loads the assignments between prototypes | |
645 Returns a dictionary with prototypes as keys and a list of | |
646 the objects/feature nums assigned to each''' | |
644 prototypeAssignments = {} | 647 prototypeAssignments = {} |
645 if Path(filename).is_file(): | 648 if Path(filename).is_file(): |
646 with sqlite3.connect(filename) as connection: | 649 with sqlite3.connect(filename) as connection: |
647 cursor = connection.cursor() | 650 cursor = connection.cursor() |
648 try: | 651 try: |