From d8ee13789b93c8edcf13bf1b20ab9e0098eb81bd Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 17 Sep 2014 17:34:28 -0400 Subject: [PATCH] Avoided a crash on an Oracle GIS test; refs #23504. --- django/contrib/gis/tests/inspectapp/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/tests/inspectapp/tests.py b/django/contrib/gis/tests/inspectapp/tests.py index 9dece4372f3..04da3c4de8f 100644 --- a/django/contrib/gis/tests/inspectapp/tests.py +++ b/django/contrib/gis/tests/inspectapp/tests.py @@ -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: