Skip to content

Commit

Permalink
Improve the DatabaseNotReady error message. Fixes buildbot#761.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Apr 9, 2010
1 parent e0947b8 commit ee904f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion buildbot/master.py
Expand Up @@ -4,6 +4,7 @@
import signal
import time
import warnings
import textwrap

from zope.interface import implements
from twisted.python import log, components
Expand Down Expand Up @@ -864,7 +865,12 @@ def loadDatabase(self, db_spec, db_poll_interval=None):
# make sure it's up to date
sm = schema.DBSchemaManager(db_spec, self.basedir)
if not sm.is_current():
raise exceptions.DatabaseNotReadyError
raise exceptions.DatabaseNotReadyError, textwrap.dedent("""
The Buildmaster database needs to be upgraded before this version of buildbot
can run. Use the following command-line
buildbot upgrade-master path/to/master
to upgrade the database, and try starting the buildmaster again. You may want
to make a backup of your buildmaster before doing so.""")

self.db = connector.DBConnector(db_spec)
self.db.start()
Expand Down

0 comments on commit ee904f4

Please sign in to comment.