Clay Gerrard 87eaaebd67 Fix DirectClientExceptions with utf-8 encoded paths
Because the direct_client module uses the buffered_http module it's
requests are already robust to receiving either unicode or utf-8 paths.

The DirectClientException message however encodes the given path with
the device key from a ring node - which having come from a json
de-serialized ring will be a unicode type.  Despite the device key
almost always being only ascii characters; python string interpolation
with any unicode type will always force all binary strings to be
converted to unicode - which will raise an error if any byte strings
includes non-ascii characters.

To maintain robustness in DirectClientException, when the provided path
is not already unicode we decode the bytes as utf-8 before mixing them
with the other unicode strings and then normalize everything back to a
quoted utf-8 byte string.

Change-Id: I162d2e093a3110856d6e1d513de3c7919079c9e7
2017-08-25 14:35:11 -07:00
..
2017-04-27 14:19:00 -07:00
2017-08-02 10:44:25 +00:00