summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsymbiont <symbiont>2005-11-12 14:32:22 +0000
committersymbiont <symbiont>2005-11-12 14:32:22 +0000
commit3a2e777ace4ea0e1e53d53413d8b5bc6dc6df8b8 (patch)
tree4011792917c2bede97f20e488c373788f26fa58d
parent448649298ec19711242a8a342cea2c5c16399210 (diff)
Fix string output when printing error objects.
-rw-r--r--mock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mock.py b/mock.py
index dc0f86b..54874b4 100644
--- a/mock.py
+++ b/mock.py
@@ -49,6 +49,9 @@ class Error(Exception):
self.msg = msg
self.resultcode = 1
+ def __str__(self):
+ return self.msg
+
class YumError(Error):
def __init__(self, msg):
Error.__init__(self, msg)