From d13acd13a59e50f0f47e20ef7366ca5a91d40713 Mon Sep 17 00:00:00 2001 From: lkuchlan Date: Wed, 27 Dec 2017 15:24:47 +0200 Subject: [PATCH] Use wraps decorator Use wraps decorator from functools library. This calls the update_wrapper method from functools which sets these built-in values to those of the wrapped function. Change-Id: I3df3d4e8dbbbbcf384436441349c05386f2b0743 --- tempest/lib/common/utils/linux/remote_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tempest/lib/common/utils/linux/remote_client.py b/tempest/lib/common/utils/linux/remote_client.py index 1676a28362..94fab00b70 100644 --- a/tempest/lib/common/utils/linux/remote_client.py +++ b/tempest/lib/common/utils/linux/remote_client.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import functools import sys import netaddr @@ -25,6 +26,7 @@ LOG = logging.getLogger(__name__) def debug_ssh(function): """Decorator to generate extra debug info in case off SSH failure""" + @functools.wraps(function) def wrapper(self, *args, **kwargs): try: return function(self, *args, **kwargs)