From: Stefan Metzmacher Date: Wed, 24 Jan 2018 18:14:53 +0000 (+0100) Subject: python/netcmd: implement __repr__ for class CommandError X-Git-Tag: tevent-0.9.36~248 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28fcf631c8985e8418fdc67cc78053e503f56d50;p=thirdparty%2Fsamba.git python/netcmd: implement __repr__ for class CommandError Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 05ecc432ea6..fcad7f6399d 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -243,3 +243,6 @@ class CommandError(Exception): self.message = message self.inner_exception = inner_exception self.exception_info = sys.exc_info() + + def __repr__(self): + return "CommandError(%s)" % self.message