There is a syntax error in your log message (lines 13-14 of the diff). The result of dict.update() is None, as update() operates in place. So
locals().update({"id": instance["id"]})
...which equals None, will not do what I think you want to do. It would be better to simply create the dict you want directly:
msg = _("Error encountered when destroying instance '%(id)s': " "%(ex)s") % {"ex": ex, "id": instance["id"]}
« Back to merge proposal
There is a syntax error in your log message (lines 13-14 of the diff). The result of dict.update() is None, as update() operates in place. So
locals( ).update( {"id": instance["id"]})
...which equals None, will not do what I think you want to do. It would be better to simply create the dict you want directly:
msg = _("Error encountered when destroying instance '%(id)s': "
"%(ex)s") % {"ex": ex, "id": instance["id"]}