add string representation for context
in the cases where context manages to make it's way into a log message we have no sane representation of it. The to_dict method provides the relevant information, so we can use a dump of that as our human friendly version. Change-Id: I394260c6957ba5c4f2b134e75cf8e7bd1d1b59c2
This commit is contained in:
parent
a07bf6dc8f
commit
239dc9ff7f
|
@ -188,6 +188,9 @@ class RequestContext(context.RequestContext):
|
|||
|
||||
return context
|
||||
|
||||
def __str__(self):
|
||||
return "<Context %s>" % self.to_dict()
|
||||
|
||||
|
||||
def get_admin_context(read_deleted="no"):
|
||||
return RequestContext(user_id=None,
|
||||
|
|
Loading…
Reference in New Issue