Skip to content

Commit

Permalink
[#1038] Fix to allow sqlite testing - for until the tests are overhau…
Browse files Browse the repository at this point in the history
…lled.
  • Loading branch information
David Read committed Jul 22, 2013
1 parent 98888d2 commit 21cd0ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckan/config/environment.py
Expand Up @@ -353,6 +353,8 @@ def genshi_lookup_attr(cls, obj, key):
# Here we create the site user if they are not already in the database
try:
logic.get_action('get_site_user')({'ignore_auth': True}, None)
except sqlalchemy.exc.ProgrammingError:
# The database is not initialised. This is a bit dirty.
except (sqlalchemy.exc.ProgrammingError, sqlalchemy.exc.OperationalError):
# (ProgrammingError for Postgres, OperationalError for SQLite)
# The database is not initialised. This is a bit dirty. This occurs
# when running tests.
pass

0 comments on commit 21cd0ac

Please sign in to comment.