Merge "Use wraps decorator"
This commit is contained in:
commit
0c71ee3fe0
@ -10,6 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import functools
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
@ -25,6 +26,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def debug_ssh(function):
|
def debug_ssh(function):
|
||||||
"""Decorator to generate extra debug info in case off SSH failure"""
|
"""Decorator to generate extra debug info in case off SSH failure"""
|
||||||
|
@functools.wraps(function)
|
||||||
def wrapper(self, *args, **kwargs):
|
def wrapper(self, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
return function(self, *args, **kwargs)
|
return function(self, *args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user