From 018f9489c8f86a10ac85d35be586e57239a76874 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Thu, 13 Apr 2017 18:55:36 +0100 Subject: [PATCH] Really fix leaking dbh. --- plugin/faction/faction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/faction/faction.py b/plugin/faction/faction.py index 833a3dd..b6e5711 100644 --- a/plugin/faction/faction.py +++ b/plugin/faction/faction.py @@ -796,10 +796,11 @@ class Faction(DBConnection): cursor = self.query('update faction_influence set timestamp=? where checksum=? and eddb_id=? and faction_id>0', [timestamp, checksum, system_id]) if not cursor.rowcount: log.warning('Failed to update timestamp for {} with checksum {}'.format(system, checksum)) + self.dbh.commit() else: + self.dbh.commit() for system, channel in announce.items(): await self.report_faction_influence(channel, system = system, update = True, yelp_if_no_data = False) - self.dbh.commit() self.close_db() return True -- 2.7.4