Skip to content

Instantly share code, notes, and snippets.

@loic
Created May 17, 2014 17:08
Show Gist options
  • Save loic/b72e80e040edfcd736ec to your computer and use it in GitHub Desktop.
Save loic/b72e80e040edfcd736ec to your computer and use it in GitHub Desktop.
diff --git a/django/contrib/gis/tests/tests.py b/django/contrib/gis/tests/tests.py
index cc52d24..540d495 100644
--- a/django/contrib/gis/tests/tests.py
+++ b/django/contrib/gis/tests/tests.py
@@ -16,7 +16,7 @@ except ImproperlyConfigured as e:
# an ImportError into an ImproperlyConfigured.
# Here, we make sure we're only catching this specific case and not another
# ImproperlyConfigured one.
- if e.args and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'):
+ if e.args and e.args[0] and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'):
HAS_POSTGRES = False
else:
six.reraise(*sys.exc_info())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment