Merge "do not include context to exception notification" into stable/ocata
This commit is contained in:
commit
6977d26608
|
@ -86,6 +86,9 @@ def _get_call_dict(function, self, context, *args, **kw):
|
|||
# self can't be serialized and shouldn't be in the
|
||||
# payload
|
||||
call_dict.pop('self', None)
|
||||
# NOTE(gibi) remove context as well as it contains sensitive information
|
||||
# and it can also contain circular references
|
||||
call_dict.pop('context', None)
|
||||
return _cleanse_dict(call_dict)
|
||||
|
||||
|
||||
|
|
|
@ -91,6 +91,7 @@ class WrapExceptionTestCase(test.NoDBTestCase):
|
|||
self.assertEqual(3, notification.payload['args']['extra'])
|
||||
for key in ['exception', 'args']:
|
||||
self.assertIn(key, notification.payload.keys())
|
||||
self.assertNotIn('context', notification.payload['args'].keys())
|
||||
|
||||
self.assertEqual(1, len(fake_notifier.VERSIONED_NOTIFICATIONS))
|
||||
notification = fake_notifier.VERSIONED_NOTIFICATIONS[0]
|
||||
|
|
Loading…
Reference in New Issue