)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6e9933cf21f809611d41f59f16855604121c2669","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the cache_key and passing it to memcached."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I26e86b7fb61b4b3380a14686bd2faa9f58017999"},{"line_number":14,"context_line":"Fixes: bug #1158958"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAOH%2F%2Fxlc%3D","line":14,"updated":"2013-03-27 23:57:18.000000000","message":"nit: this should be above 13","commit_id":"73b3b2f54c4ac03773d8c01e1df4f7c0ab1ef859"},{"author":{"_account_id":5162,"name":"Dan Florea","email":"dan.florea@gmail.com","username":"dflorea"},"change_message_id":"ccd6bcb8f9dc7edead9f919de101fd62146e20c6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the cache_key and passing it to memcached."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I26e86b7fb61b4b3380a14686bd2faa9f58017999"},{"line_number":14,"context_line":"Fixes: bug #1158958"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAOH%2F%2FxEc%3D","line":14,"in_reply_to":"AAAAOH%2F%2Fxlc%3D","updated":"2013-03-28 12:05:35.000000000","message":"Done","commit_id":"73b3b2f54c4ac03773d8c01e1df4f7c0ab1ef859"}],"nova/api/openstack/compute/contrib/extended_availability_zone.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"1f33c4f85a0e5cd31593eefed428e6474f77965e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.mc \u003d memorycache.get_client()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _get_host_az(self, context, instance):"},{"line_number":40,"context_line":"        host \u003d str(instance.get(\u0027host\u0027))"},{"line_number":41,"context_line":"        if not host:"},{"line_number":42,"context_line":"            return None"},{"line_number":43,"context_line":"        cache_key \u003d \"azcache-%s\" % host"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxXo%3D","line":40,"updated":"2013-03-28 05:34:47.000000000","message":"Is this safe? I would have thought you would have had to do something more like unicodedata.normalize?","commit_id":"73b3b2f54c4ac03773d8c01e1df4f7c0ab1ef859"},{"author":{"_account_id":5162,"name":"Dan Florea","email":"dan.florea@gmail.com","username":"dflorea"},"change_message_id":"ccd6bcb8f9dc7edead9f919de101fd62146e20c6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.mc \u003d memorycache.get_client()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _get_host_az(self, context, instance):"},{"line_number":40,"context_line":"        host \u003d str(instance.get(\u0027host\u0027))"},{"line_number":41,"context_line":"        if not host:"},{"line_number":42,"context_line":"            return None"},{"line_number":43,"context_line":"        cache_key \u003d \"azcache-%s\" % host"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxE0%3D","line":40,"in_reply_to":"AAAAOH%2F%2FxXo%3D","updated":"2013-03-28 12:05:35.000000000","message":"str() will throw an exception if it finds non-ascii characters. So it is not safe, as you point out. host.encode(\u0027ascii\u0027, \u0027replace\u0027) would be safe and replace non-ascii characters with the character \u0027?\u0027. The downside would be that problems would occur later.","commit_id":"73b3b2f54c4ac03773d8c01e1df4f7c0ab1ef859"}]}
