comparison python/utils.py @ 392:dd4970f4221f

merged
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 25 Jul 2013 18:59:35 -0400
parents 03dbecd3a887
children 6fba1ab040f1
comparison
equal deleted inserted replaced
390:12be4a0cb9aa 392:dd4970f4221f
540 'deletes the table with names in tableNames' 540 'deletes the table with names in tableNames'
541 import sqlite3 541 import sqlite3
542 try: 542 try:
543 cursor = connection.cursor() 543 cursor = connection.cursor()
544 for tableName in tableNames: 544 for tableName in tableNames:
545 cursor.execute('DROP TABLE '+tableName) 545 cursor.execute('DROP TABLE IF EXISTS '+tableName)
546 except sqlite3.OperationalError as error: 546 except sqlite3.OperationalError as error:
547 printDBError(error) 547 printDBError(error)
548 548
549 ######################### 549 #########################
550 # running tests 550 # running tests