python/netcmd: implement __repr__ for class CommandError
authorStefan Metzmacher <metze@samba.org>
Wed, 24 Jan 2018 18:14:53 +0000 (19:14 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Feb 2018 12:49:11 +0000 (13:49 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
python/samba/netcmd/__init__.py

index 05ecc432ea6beda2cf8c86658ee50c2a511e19a2..fcad7f6399d1e2e4d017db14e75e0183fdfdd3d5 100644 (file)
@@ -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