Fix list command when not given search_opts

Can't pop values out of None.

Change-Id: I2c62d8bcae4cc4d035fa2bb3aadffb0e1d190751
Closes-Bug: #1707303
This commit is contained in:
Goutham Pacha Ravi 2017-07-28 17:17:36 -04:00
parent 502eb756cc
commit 98e0933ca8
2 changed files with 5 additions and 0 deletions

View File

@ -325,6 +325,7 @@ class ShareManager(base.ManagerWithFind):
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
"""Get a list of all shares."""
search_opts = search_opts or {}
search_opts.pop("export_location", None)
return self.do_list(detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir)

View File

@ -0,0 +1,4 @@
---
fixes:
- The list command for --os-share-api-version <=2.34 has been fixed to not
error out in case there are no search options/filters specified.