Avoided a crash on an Oracle GIS test; refs #23504.

This commit is contained in:
Tim Graham 2014-09-17 17:34:28 -04:00
parent 7fce7f51ef
commit d8ee13789b
1 changed files with 5 additions and 1 deletions

View File

@ -139,7 +139,11 @@ def get_ogr_db_string():
'django.contrib.gis.db.backends.spatialite': ('SQLite', '%(db_name)s', '')
}
drv_name, db_str, param_sep = drivers.get(db['ENGINE'])
db_engine = db['ENGINE']
if db_engine not in drivers:
return None
drv_name, db_str, param_sep = drivers[db_engine]
# Ensure that GDAL library has driver support for the database.
try: