Allow examples.get call without data

It wasn't possible to call examples.get without a --data parameter. This
change checks if the opts.data is empty, and if so, just deals with it.

Change-Id: I262e8f8b061d163e478c3b9fe611a44180119909
This commit is contained in:
Brian Curtin 2015-01-31 22:46:21 -06:00
parent bddb145c54
commit 0a235978f8
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ def find_resource_cls(opts):
def get_data_option(opts):
if not opts.data:
return opts.data
try:
iddy = uuid.UUID(opts.data)
return {'id': iddy}