From 2234a7cd6d74d016998ae5ce1843332cd7f08539 Mon Sep 17 00:00:00 2001 From: xingzhou Date: Mon, 27 May 2013 03:00:55 -0400 Subject: [PATCH] Missing command descriptions for 'token-get' and 'endpoint-get' When using command "keystone help token-get" and "keystone help endpoint-get", the description of these commands are missing. The main reason is that keystoneclient is using the command action method's method doc as the command description. In keystoneclient/v2_0/shell.py, the two commands' action method are 'do_endpoint_get' and 'do_token_get'. These two methods have a decorator of "require_service_catalog" which is a function wrapper, and this decorator has changed the origin __doc__ of the wrapped function by default Modify "require_service_catalog" to change the __doc__ back to the origin function's __doc__ Change-Id: I9977a3d279529b2066667cd2ffe44dd953b4d2fb Fixes: Bug 1182107 --- keystoneclient/v2_0/shell.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keystoneclient/v2_0/shell.py b/keystoneclient/v2_0/shell.py index 0c7c233ce..a8dc92804 100755 --- a/keystoneclient/v2_0/shell.py +++ b/keystoneclient/v2_0/shell.py @@ -36,6 +36,9 @@ def require_service_catalog(f): raise Exception(msg) return f(kc, args) + # Change __doc__ attribute back to origin function's __doc__ + wrapped.__doc__ = f.__doc__ + return wrapped