From 0a235978f8c1f3b3a057e38bffd4c09c267c1994 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Sat, 31 Jan 2015 22:46:21 -0600 Subject: [PATCH] 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 --- examples/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/common.py b/examples/common.py index cfacbcec..c3b5a88b 100755 --- a/examples/common.py +++ b/examples/common.py @@ -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}