Skip to content

Commit

Permalink
catalogue db: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matley committed Apr 27, 2012
1 parent b71740e commit ae38b71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eqcatalogue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _load_extension(self, session):
try:
session.execute('select * from spatial_ref_sys')
except sqlite.OperationalError:
self._initialize_spatialite_db(session)
_initialize_spatialite_db(session)

def _setup(self, memory=False, filename=None, drop=False):
"""Setup a sqlalchemy connection to spatialite with the proper
Expand Down Expand Up @@ -443,5 +443,5 @@ def _initialize_spatialite_db(connection):
"VALUES (4326, 'epsg', 4326, 'WGS 84',"
" '+proj=longlat "
"+ellps=WGS84 +datum=WGS84 +no_defs')")
except sqlite.OperationalError:
except sqlite.IntegrityError:
pass

0 comments on commit ae38b71

Please sign in to comment.