Skip to content

Commit

Permalink
don't try to detect bug1810 more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Mar 13, 2013
1 parent ede1de8 commit e8d2d39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions master/buildbot/db/pool.py
Expand Up @@ -88,7 +88,7 @@ class DBThreadPool(threadpool.ThreadPool):
# SQLite have this bug, although it has only been observed in 3.4.2. A
# dynamic check for this bug would be more appropriate. This is documented
# in bug #1810.
__broken_sqlite = False
__broken_sqlite = None

def __init__(self, engine, verbose=False):
# verbose is used by upgrade scripts, and if it is set we should print
Expand Down Expand Up @@ -123,7 +123,9 @@ def log_msg(m):
log_msg("NOTE: this old version of SQLite is not "
"supported.")
raise RuntimeError("unsupported SQLite version")
brkn = self.__broken_sqlite = self.detect_bug1810()
if self.__broken_sqlite is None:
self.__class__.__broken_sqlite = self.detect_bug1810()
brkn = self.__broken_sqlite
if brkn:
log_msg("Applying SQLite workaround from Buildbot bug #1810")
self._start_evt = reactor.callWhenRunning(self._start)
Expand Down

0 comments on commit e8d2d39

Please sign in to comment.