mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
Please don't hate on flake8
This commit is contained in:
@@ -20,14 +20,12 @@ 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, # noqa
|
||||
port=int(settings.MONGO_PORT), # noqa
|
||||
username=settings.MONGO_USERNAME, # noqa
|
||||
password=settings.MONGO_PASSWORD, # noqa
|
||||
tz_aware=settings.USE_TZ, # noqa
|
||||
) # noqa
|
||||
host=settings.MONGO_HOST,
|
||||
port=int(settings.MONGO_PORT),
|
||||
username=settings.MONGO_USERNAME,
|
||||
password=settings.MONGO_PASSWORD,
|
||||
tz_aware=settings.USE_TZ)
|
||||
register_key_transform(get_db())
|
||||
except ConnectionError:
|
||||
logger.warn('Failed to establish connect to MongoDB "%s"' % (settings.MONGO_DB))
|
||||
|
||||
Reference in New Issue
Block a user