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.
Reviewed: https:/ /review. openstack. org/367455 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2b57b3d867f 568a1539d4419b4 41ae8d666b77c4
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2b57b3d867f568a 1539d4419b441ae 8d666b77c4
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
Closes-Bug: #1621392