mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
only override django for FIPS in environments where Django is installed
isolated awx installs don't have this tooling, and so they don't need this specific monkey-patch
This commit is contained in:
@@ -22,12 +22,18 @@ except ImportError: # pragma: no cover
|
|||||||
|
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
try:
|
||||||
import django
|
import django
|
||||||
from django.utils.encoding import force_bytes
|
from django.utils.encoding import force_bytes
|
||||||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
||||||
from django.db.backends.base import schema
|
from django.db.backends.base import schema
|
||||||
|
HAS_DJANGO = True
|
||||||
|
except ImportError:
|
||||||
|
HAS_DJANGO = False
|
||||||
|
|
||||||
|
|
||||||
|
if HAS_DJANGO is True:
|
||||||
# This line exists to make sure we don't regress on FIPS support if we
|
# This line exists to make sure we don't regress on FIPS support if we
|
||||||
# upgrade Django; if you're upgrading Django and see this error,
|
# upgrade Django; if you're upgrading Django and see this error,
|
||||||
# update the version check below, and confirm that FIPS still works.
|
# update the version check below, and confirm that FIPS still works.
|
||||||
|
|||||||
Reference in New Issue
Block a user