From b347f761a71221aff8280e13cfe8d50102cdb2f6 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 19 Mar 2014 18:13:55 +0100 Subject: [PATCH] Ignore faulty category tables They don't have any categories anyway, so might aswell ignore the error. --- couchpotato/core/database.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/database.py b/couchpotato/core/database.py index 76c4a41..3aa1bb7 100644 --- a/couchpotato/core/database.py +++ b/couchpotato/core/database.py @@ -159,7 +159,15 @@ class Database(object): for ml in migrate_list: migrate_data[ml] = {} rows = migrate_list[ml] - c.execute('SELECT %s FROM `%s`' % ('`' + '`,`'.join(rows) + '`', ml)) + + try: + c.execute('SELECT %s FROM `%s`' % ('`' + '`,`'.join(rows) + '`', ml)) + except: + # ignore faulty destination_id database + if ml == 'category': + migrate_data[ml] = {} + else: + raise for p in c.fetchall(): columns = {}