From: Alfredo Deza Date: Fri, 2 Aug 2013 15:48:52 +0000 (-0400) Subject: log the callable if it has a docstring X-Git-Tag: v1.2~11^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55cbae85999d120c9ccd738bdb859054b4e006da;p=ceph-deploy.git log the callable if it has a docstring Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/util/context.py b/ceph_deploy/util/context.py index 600c355..56fc1e9 100644 --- a/ceph_deploy/util/context.py +++ b/ceph_deploy/util/context.py @@ -26,6 +26,7 @@ class remote(object): self.client = client self.logger = logger self.func = func + self.description = getattr(func, 'func_doc') self.mangle_exc = mangle_exc def __enter__(self): @@ -34,6 +35,8 @@ class remote(object): self.client.modules.sys.stdout = StringIO.StringIO() self.client.modules.sys.stderr = StringIO.StringIO() + if self.description: + self.logger.info(self.description) return remote_compile(self.client, self.func) def __exit__(self, e_type, e_val, e_traceback):