Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Jul 29, 2016
1 parent 61d44d9 commit 623fc92
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sickbeard/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,17 @@ def _execute(self, query, args=None, fetchall=False, fetchone=False):
return sql_results.fetchone()
else:
return sql_results
except sqlite3.OperationalError as e:
# This errors user should be able to fix it.
if 'unable to open database file' in e.args[0] or \
'database is locked' in e.args[0] or \
'database or disk is full' in e.args[0]:
logger.log(u'DB error: {0!r}'.format(e), logger.WARNING)
else:
logger.log(u'DB error: {0!r}'.format(e), logger.ERROR)
raise
except Exception:
logger.log(u'DB error: {0!r}'.format(e), logger.ERROR)
raise

def checkDBVersion(self):
Expand Down

0 comments on commit 623fc92

Please sign in to comment.