Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'migrate-fixes' of git://github.com/PiotrSikora/buildbot

* 'migrate-fixes' of git://github.com/PiotrSikora/buildbot:
  Change order.
  Fix integration with SQLAlchemy-migrate-0.6.1.

(_hush_pyflakes added by dustin)
  • Loading branch information...
commit 0e78c4c71020170c2732bbdc1d898cb0d9a6b723 2 parents eae1014 + fb4d65f
Dustin J. Mitchell djmitche authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 master/buildbot/db/model.py
9 master/buildbot/db/model.py
@@ -21,10 +21,15 @@
21 21 import migrate
22 22 import migrate.versioning.schema
23 23 import migrate.versioning.repository
24   -import migrate.versioning.exceptions
25 24 from twisted.python import util, log
26 25 from buildbot.db import base
27 26
  27 +try:
  28 + from migrate.versioning import exceptions
  29 + _hush_pyflakes = exceptions
  30 +except ImportError:
  31 + from migrate import exceptions
  32 +
28 33 class Model(base.DBConnectorComponent):
29 34 """
30 35 DBConnector component to handle the database model; an instance is available
@@ -345,7 +350,7 @@ def thd(engine):
345 350 # migrate.api doesn't let us hand in an engine
346 351 schema = migrate.versioning.schema.ControlledSchema(engine, self.repo_path)
347 352 db_version = schema.version
348   - except migrate.versioning.exceptions.DatabaseNotControlledError:
  353 + except exceptions.DatabaseNotControlledError:
349 354 return False
350 355
351 356 return db_version == repo_version

0 comments on commit 0e78c4c

Please sign in to comment.
Something went wrong with that request. Please try again.