summaryrefslogtreecommitdiff
path: root/cinderclient/base.py
diff options
context:
space:
mode:
authorEric Harney <eharney@redhat.com>2018-10-22 16:53:07 -0400
committerRajat Dhasmana <rajatdhasmana@gmail.com>2018-12-21 06:16:55 +0000
commite40166740ea78d4a1eb2a7040afe3a502374af51 (patch)
tree6be4d313cd63b7e30a278bc3b9f31d03b410983d /cinderclient/base.py
parent3c143d95b3b270f77bf9fa55c16ae06505fe107c (diff)
downloadpython-cinderclient-e40166740ea78d4a1eb2a7040afe3a502374af51.tar.gz
More shell completion cache additions
Closes-Bug: #1712835 Change-Id: I9326d5d92ff2e93dd0398d9a115210b376059064
Diffstat (limited to 'cinderclient/base.py')
-rw-r--r--cinderclient/base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cinderclient/base.py b/cinderclient/base.py
index a6999ad..77630a6 100644
--- a/cinderclient/base.py
+++ b/cinderclient/base.py
@@ -309,7 +309,10 @@ class Manager(common_base.HookableMixin):
def write_to_completion_cache(self, cache_type, val):
cache = getattr(self, "_%s_cache" % cache_type, None)
if cache:
- cache.write("%s\n" % val)
+ try:
+ cache.write("%s\n" % val)
+ except UnicodeEncodeError:
+ pass
def _get(self, url, response_key=None):
resp, body = self.api.client.get(url)