The repr on the LifecycleEvent object includes a translated
name, which blows up with a UnicodeEncodeError in the emit_event
method because of str(event) and non-English locales.
This change uses six.text_type on the object rather than str
and adds a test to recreate the bug and show the fix.
Change-Id: I9b7b52739883043b7aae9759f500e5e21cfe8b30
Closes-Bug: #1621392
(cherry picked from commit 2b57b3d867f568a1539d4419b441ae8d666b77c4)
Reviewed: https:/ /review. openstack. org/368344 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=53a5d12ad55 d5946d917455ef6 478c94e724043c
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 53a5d12ad55d594 6d917455ef6478c 94e724043c
Author: Matt Riedemann <email address hidden>
Date: Thu Sep 8 11:14:52 2016 -0400
virt: handle unicode when logging LifecycleEvents
The repr on the LifecycleEvent object includes a translated
name, which blows up with a UnicodeEncodeError in the emit_event
method because of str(event) and non-English locales.
This change uses six.text_type on the object rather than str
and adds a test to recreate the bug and show the fix.
Change-Id: I9b7b5273988304 3b7aae9759f500e 5e21cfe8b30 1539d4419b441ae 8d666b77c4)
Closes-Bug: #1621392
(cherry picked from commit 2b57b3d867f568a