From 2eec706197c5482e6204df236f4ace9b7a177233 Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 17 Jun 2014 09:02:23 -0700 Subject: [PATCH] Fix for failed download handling and sql issues --- sickbeard/failed_history.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sickbeard/failed_history.py b/sickbeard/failed_history.py index f89f69d8..03b63b6b 100644 --- a/sickbeard/failed_history.py +++ b/sickbeard/failed_history.py @@ -78,7 +78,8 @@ def logFailed(release): provider = sql_results[0]["provider"] if not hasFailed(release, size, provider): - myDB.action("INSERT INTO failed (release, size, provider) VALUES (?, ?, ?)", [release, size, provider]) + with db.DBConnection('failed.db') as myDB: + myDB.action("INSERT INTO failed (release, size, provider) VALUES (?, ?, ?)", [release, size, provider]) deleteLoggedSnatch(release, size, provider)