From dce5107606bd6e5424b8f1552453876dbcf0af30 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 11 Jun 2012 09:55:53 +0200 Subject: [PATCH] Check dict before deleting. fix #401 --- couchpotato/core/plugins/scanner/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 00e4299a..0b07758e 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -257,7 +257,8 @@ class Scanner(Plugin): # Cleaning up used for identifier in delete_identifiers: - del self.path_identifiers[identifier] + if self.path_identifiers.get(identifier): + del self.path_identifiers[identifier] del delete_identifiers # Group based on folder @@ -282,7 +283,8 @@ class Scanner(Plugin): # Cleaning up used for identifier in delete_identifiers: - del self.path_identifiers[identifier] + if self.path_identifiers.get(identifier): + del self.path_identifiers[identifier] del delete_identifiers # Determine file types