summaryrefslogtreecommitdiffstats
path: root/awx/settings/local_settings.py.docker_compose
diff options
context:
space:
mode:
Diffstat (limited to 'awx/settings/local_settings.py.docker_compose')
-rw-r--r--awx/settings/local_settings.py.docker_compose36
1 files changed, 3 insertions, 33 deletions
diff --git a/awx/settings/local_settings.py.docker_compose b/awx/settings/local_settings.py.docker_compose
index acc0a5cd39..bea9e4611f 100644
--- a/awx/settings/local_settings.py.docker_compose
+++ b/awx/settings/local_settings.py.docker_compose
@@ -12,39 +12,9 @@
# MISC PROJECT SETTINGS
###############################################################################
import os
-import urllib
+import urllib.parse
import sys
-
-def patch_broken_pipe_error():
- """Monkey Patch BaseServer.handle_error to not write
- a stacktrace to stderr on broken pipe.
- http://stackoverflow.com/a/22618740/362702"""
- import sys
- from SocketServer import BaseServer
- from wsgiref import handlers
-
- handle_error = BaseServer.handle_error
- log_exception = handlers.BaseHandler.log_exception
-
- def is_broken_pipe_error():
- type, err, tb = sys.exc_info()
- return "Connection reset by peer" in repr(err)
-
- def my_handle_error(self, request, client_address):
- if not is_broken_pipe_error():
- handle_error(self, request, client_address)
-
- def my_log_exception(self, exc_info):
- if not is_broken_pipe_error():
- log_exception(self, exc_info)
-
- BaseServer.handle_error = my_handle_error
- handlers.BaseHandler.log_exception = my_log_exception
-
-patch_broken_pipe_error()
-
-
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
@@ -83,7 +53,7 @@ if "pytest" in sys.modules:
BROKER_URL = "amqp://{}:{}@{}/{}".format(os.environ.get("RABBITMQ_USER"),
os.environ.get("RABBITMQ_PASS"),
os.environ.get("RABBITMQ_HOST"),
- urllib.quote(os.environ.get("RABBITMQ_VHOST", "/"), safe=''))
+ urllib.parse.quote(os.environ.get("RABBITMQ_VHOST", "/"), safe=''))
CHANNEL_LAYERS = {
'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer',
@@ -236,7 +206,7 @@ LOGGING['handlers']['management_playbooks'] = {'class': 'logging.NullHandler'}
try:
path = os.path.expanduser(os.path.expandvars('~/.ssh/id_rsa'))
- TEST_SSH_KEY_DATA = file(path, 'rb').read()
+ TEST_SSH_KEY_DATA = open(path, 'rb').read()
except IOError:
TEST_SSH_KEY_DATA = ''