From 47a906aff3cee8bc2f3e8102bf9f30802cf7974d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 12 Nov 2015 17:24:55 +0100 Subject: [PATCH] middleware: remove oslo.context usage There's nothing interesting in the fake context we're passing. Let's stop depending on oslo.context all together here. Change-Id: I7784bc3b818e67118e03905857c39eac66765fad --- oslo_messaging/notify/middleware.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oslo_messaging/notify/middleware.py b/oslo_messaging/notify/middleware.py index b5d3092b5..60aab278b 100644 --- a/oslo_messaging/notify/middleware.py +++ b/oslo_messaging/notify/middleware.py @@ -22,7 +22,6 @@ import sys import traceback as tb from oslo_config import cfg -from oslo_context import context from oslo_middleware import base import six import webob.dec @@ -85,7 +84,7 @@ class RequestNotifier(base.Middleware): 'request': self.environ_to_dict(request.environ), } - self.notifier.info(context.get_admin_context(), + self.notifier.info({}, 'http.request', payload) @@ -108,7 +107,7 @@ class RequestNotifier(base.Middleware): 'traceback': tb.format_tb(traceback) } - self.notifier.info(context.get_admin_context(), + self.notifier.info({}, 'http.response', payload)