diff options
author | whoami-rajat <rajatdhasmana@gmail.com> | 2018-08-02 17:06:05 +0000 |
---|---|---|
committer | whoami-rajat <rajatdhasmana@gmail.com> | 2018-08-13 14:34:47 +0000 |
commit | b3487484d8250ef7036e75d8dbd85e30d629a35e (patch) | |
tree | ca9bac70fd445bf19bd7f632369d41e9a7d14ff2 /cinderclient/v2 | |
parent | 460229c6099719dec0d027f798f9c751b8ec7e44 (diff) | |
download | python-cinderclient-b3487484d8250ef7036e75d8dbd85e30d629a35e.tar.gz |
__repr__ crashes when empty dict passed
The Capabilities class __repr__ method crashes when
along with any manager object, the info is passed as
empty dict.
This patch handles the issue.
Change-Id: Ife5cfc82137d107b27b011aa83c3a9c89e78d701
Closes-Bug: #1785091
Diffstat (limited to 'cinderclient/v2')
-rw-r--r-- | cinderclient/v2/capabilities.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cinderclient/v2/capabilities.py b/cinderclient/v2/capabilities.py index 305397f..2045f02 100644 --- a/cinderclient/v2/capabilities.py +++ b/cinderclient/v2/capabilities.py @@ -22,7 +22,7 @@ class Capabilities(base.Resource): NAME_ATTR = 'name' def __repr__(self): - return "<Capabilities: %s>" % self._info['namespace'] + return "<Capabilities: %s>" % self._info.get('namespace') class CapabilitiesManager(base.Manager): |