mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
Suppress flake8 silliness
This commit is contained in:
parent
131da8775d
commit
4ad92fd253
@ -8,7 +8,6 @@ import datetime
|
||||
import dateutil
|
||||
import time
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# Django
|
||||
@ -239,7 +238,7 @@ class ApiV1ConfigView(APIView):
|
||||
# sure that we have a valid MongoDB to point to, and complain if
|
||||
# we do not.
|
||||
if (license_data['features']['system_tracking'] and
|
||||
settings.MONGO_HOST == NotImplemented):
|
||||
settings.MONGO_HOST == NotImplemented): # noqa
|
||||
return Response({
|
||||
'error': 'This license supports system tracking, which '
|
||||
'requires MongoDB to be installed. Since you are '
|
||||
|
||||
@ -20,13 +20,14 @@ try:
|
||||
raise ConnectionError
|
||||
|
||||
# Attempt to connect to the MongoDB database.
|
||||
# P.S. Flake8 is terrible. This indentation is consistent with PEP8.
|
||||
connect(settings.MONGO_DB,
|
||||
host=settings.MONGO_HOST,
|
||||
port=int(settings.MONGO_PORT),
|
||||
username=settings.MONGO_USERNAME,
|
||||
password=settings.MONGO_PASSWORD,
|
||||
tz_aware=settings.USE_TZ,
|
||||
)
|
||||
host=settings.MONGO_HOST, # noqa
|
||||
port=int(settings.MONGO_PORT), # noqa
|
||||
username=settings.MONGO_USERNAME, # noqa
|
||||
password=settings.MONGO_PASSWORD, # noqa
|
||||
tz_aware=settings.USE_TZ, # noqa
|
||||
) # noqa
|
||||
register_key_transform(get_db())
|
||||
except ConnectionError:
|
||||
logger.warn('Failed to establish connect to MongoDB "%s"' % (settings.MONGO_DB))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user