Suppress flake8 silliness

This commit is contained in:
Luke Sneeringer
2015-06-05 11:24:09 -05:00
parent 131da8775d
commit 4ad92fd253
2 changed files with 8 additions and 8 deletions

View File

@@ -8,7 +8,6 @@ import datetime
import dateutil import dateutil
import time import time
import socket import socket
import subprocess
import sys import sys
# Django # Django
@@ -239,7 +238,7 @@ class ApiV1ConfigView(APIView):
# sure that we have a valid MongoDB to point to, and complain if # sure that we have a valid MongoDB to point to, and complain if
# we do not. # we do not.
if (license_data['features']['system_tracking'] and if (license_data['features']['system_tracking'] and
settings.MONGO_HOST == NotImplemented): settings.MONGO_HOST == NotImplemented): # noqa
return Response({ return Response({
'error': 'This license supports system tracking, which ' 'error': 'This license supports system tracking, which '
'requires MongoDB to be installed. Since you are ' 'requires MongoDB to be installed. Since you are '

View File

@@ -20,13 +20,14 @@ try:
raise ConnectionError raise ConnectionError
# Attempt to connect to the MongoDB database. # Attempt to connect to the MongoDB database.
# P.S. Flake8 is terrible. This indentation is consistent with PEP8.
connect(settings.MONGO_DB, connect(settings.MONGO_DB,
host=settings.MONGO_HOST, host=settings.MONGO_HOST, # noqa
port=int(settings.MONGO_PORT), port=int(settings.MONGO_PORT), # noqa
username=settings.MONGO_USERNAME, username=settings.MONGO_USERNAME, # noqa
password=settings.MONGO_PASSWORD, password=settings.MONGO_PASSWORD, # noqa
tz_aware=settings.USE_TZ, tz_aware=settings.USE_TZ, # noqa
) ) # noqa
register_key_transform(get_db()) register_key_transform(get_db())
except ConnectionError: except ConnectionError:
logger.warn('Failed to establish connect to MongoDB "%s"' % (settings.MONGO_DB)) logger.warn('Failed to establish connect to MongoDB "%s"' % (settings.MONGO_DB))