Use .clear() instead of reassigning to empty lists.

I cannot remember if there is a reason I chose to use empty lists.
If there is, I'll rediscover it and write a comment. Until then, it
makes sense to use clear as an explicit clearing of the list.
This commit is contained in:
voussoir 2020-04-15 16:31:09 -07:00
parent 43a665fd91
commit 35895856e6

View file

@ -765,8 +765,8 @@ class PDBSQLMixin:
else:
self.log.debug('Rolling back.')
self.sql_execute('ROLLBACK')
self.savepoints = []
self.on_commit_queue = []
self.savepoints.clear()
self.on_commit_queue.clear()
def savepoint(self, message=None):
savepoint_id = helpers.random_hex(length=16)