From 388196b372f693b596cf96c6982d5b38ff0d8b56 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 19 Feb 2014 14:44:27 -0300 Subject: Catch ProgrammingError from pysqlcipher too. Related to #5130. --- src/leap/bitmask/services/soledad/soledadbootstrapper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask/services/soledad/soledadbootstrapper.py') diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 797508a7..7aa86a02 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -20,15 +20,16 @@ Soledad bootstrapping import logging import os import socket -import sqlite3 import sys from ssl import SSLError +from sqlite3 import ProgrammingError as sqlite_ProgrammingError from PySide import QtCore from u1db import errors as u1db_errors from twisted.internet import threads from zope.proxy import sameProxiedObjects +from pysqlcipher.dbapi2 import ProgrammingError as sqlcipher_ProgrammingError from leap.bitmask.config import flags from leap.bitmask.config.providerconfig import ProviderConfig @@ -440,7 +441,7 @@ class SoledadBootstrapper(AbstractBootstrapper): except u1db_errors.InvalidGeneration as exc: logger.error("%r" % (exc,)) raise SoledadSyncError("u1db: InvalidGeneration") - except sqlite3.ProgrammingError as e: + except (sqlite_ProgrammingError, sqlcipher_ProgrammingError) as e: logger.exception("%r" % (e,)) raise except Exception as exc: -- cgit v1.2.3