From 61e1e5d2c26b1e396b95b82d088aeed68f15d599 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 21 Jun 2014 18:35:57 -0700 Subject: [PATCH] Fix for __exit__ DB errors --- sickbeard/providers/btn.py | 4 ++-- sickbeard/providers/hdbits.py | 4 ++-- sickbeard/providers/hdtorrents.py | 4 ++-- sickbeard/providers/iptorrents.py | 4 ++-- sickbeard/providers/kat.py | 4 ++-- sickbeard/providers/newznab.py | 4 ++-- sickbeard/providers/nextgen.py | 4 ++-- sickbeard/providers/publichd.py | 4 ++-- sickbeard/providers/scc.py | 4 ++-- sickbeard/providers/speedcd.py | 4 ++-- sickbeard/providers/thepiratebay.py | 4 ++-- sickbeard/providers/torrentday.py | 4 ++-- sickbeard/providers/torrentleech.py | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sickbeard/providers/btn.py b/sickbeard/providers/btn.py index 5a596a28..71c69c48 100644 --- a/sickbeard/providers/btn.py +++ b/sickbeard/providers/btn.py @@ -344,8 +344,8 @@ class BTNCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) else: raise AuthException( diff --git a/sickbeard/providers/hdbits.py b/sickbeard/providers/hdbits.py index e5396785..ab5829c1 100644 --- a/sickbeard/providers/hdbits.py +++ b/sickbeard/providers/hdbits.py @@ -255,8 +255,8 @@ class HDBitsCache(tvcache.TVCache): ql.append(ci) if ql: - with self._getDB() as myDB: - myDB.mass_action(ql) + myDB = self._getDB() + myDB.mass_action(ql) else: raise exceptions.AuthException( diff --git a/sickbeard/providers/hdtorrents.py b/sickbeard/providers/hdtorrents.py index 145304f3..dce7b540 100644 --- a/sickbeard/providers/hdtorrents.py +++ b/sickbeard/providers/hdtorrents.py @@ -377,8 +377,8 @@ class HDTorrentsCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/iptorrents.py b/sickbeard/providers/iptorrents.py index f27fcc83..8dc1288d 100644 --- a/sickbeard/providers/iptorrents.py +++ b/sickbeard/providers/iptorrents.py @@ -318,8 +318,8 @@ class IPTorrentsCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 7cd20b9b..95b14338 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -455,8 +455,8 @@ class KATCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/newznab.py b/sickbeard/providers/newznab.py index a88a5bad..4b2bddb0 100755 --- a/sickbeard/providers/newznab.py +++ b/sickbeard/providers/newznab.py @@ -342,8 +342,8 @@ class NewznabCache(tvcache.TVCache): ql.append(ci) if ql: - with self._getDB() as myDB: - myDB.mass_action(ql) + myDB = self._getDB() + myDB.mass_action(ql) else: raise AuthException( diff --git a/sickbeard/providers/nextgen.py b/sickbeard/providers/nextgen.py index dc16b08f..d8a3cda8 100644 --- a/sickbeard/providers/nextgen.py +++ b/sickbeard/providers/nextgen.py @@ -367,8 +367,8 @@ class NextGenCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/publichd.py b/sickbeard/providers/publichd.py index 3f276e66..fdd737ec 100644 --- a/sickbeard/providers/publichd.py +++ b/sickbeard/providers/publichd.py @@ -340,8 +340,8 @@ class PublicHDCache(tvcache.TVCache): ql.append(ci) if ql: - with self._getDB() as myDB: - myDB.mass_action(ql) + myDB = self._getDB() + myDB.mass_action(ql) def _parseItem(self, item): diff --git a/sickbeard/providers/scc.py b/sickbeard/providers/scc.py index 35c710b3..c38262b8 100644 --- a/sickbeard/providers/scc.py +++ b/sickbeard/providers/scc.py @@ -362,8 +362,8 @@ class SCCCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/speedcd.py b/sickbeard/providers/speedcd.py index 21d553a2..d0aa2823 100644 --- a/sickbeard/providers/speedcd.py +++ b/sickbeard/providers/speedcd.py @@ -302,8 +302,8 @@ class SpeedCDCache(tvcache.TVCache): ql.append(ci) if ql: - with self._getDB() as myDB: - myDB.mass_action(ql) + myDB = self._getDB() + myDB.mass_action(ql) def _parseItem(self, item): diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index 7a291baa..af2e838c 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -435,8 +435,8 @@ class ThePirateBayCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/torrentday.py b/sickbeard/providers/torrentday.py index 9a3d1fa2..165408a8 100644 --- a/sickbeard/providers/torrentday.py +++ b/sickbeard/providers/torrentday.py @@ -326,8 +326,8 @@ class TorrentDayCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item): diff --git a/sickbeard/providers/torrentleech.py b/sickbeard/providers/torrentleech.py index 2def94f1..33e1e8e6 100644 --- a/sickbeard/providers/torrentleech.py +++ b/sickbeard/providers/torrentleech.py @@ -321,8 +321,8 @@ class TorrentLeechCache(tvcache.TVCache): cl.append(ci) if cl: - with self._getDB() as myDB: - myDB.mass_action(cl) + myDB = self._getDB() + myDB.mass_action(cl) def _parseItem(self, item):