Skip to content
Browse files

Replaced an ImportError with ImproperlyConfigured in the Oracle backend.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 3863c90 commit b8c368feb254b225edacb50de13c9037cfd1ef9c @ikelly ikelly committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/db/backends/oracle/
7 django/db/backends/oracle/
@@ -18,8 +18,11 @@ def _setup_environment(environ):
if platform.system().upper().startswith('CYGWIN'):
import ctypes
- except ImportError:
- raise ImportError("ctypes not found. The Oracle backend requires ctypes to operate correctly under Cygwin.")
+ except ImportError, e:
+ from django.core.exceptions import ImproperlyConfigured
+ raise ImproperlyConfigured("Error loading ctypes: %s; "
+ "the Oracle backend requires ctypes to "
+ "operate correctly under Cygwin." % e)
kernel32 = ctypes.CDLL('kernel32')
for name, value in environ:
kernel32.SetEnvironmentVariableA(name, value)

0 comments on commit b8c368f

Please sign in to comment.
Something went wrong with that request. Please try again.