From ff7ef36c7b2fd421661792e2b3a89698d8b6f2d7 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Sun, 9 Nov 2014 16:46:31 -0800 Subject: [PATCH] add __str__ for PrintableError Summary: This makes it easier to read plugin errors that happen during tests. Reviewers: sean Differential Revision: https://phabricator.buildinspace.com/D119 --- peru/error.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/peru/error.py b/peru/error.py index 191245c..b8b4a75 100644 --- a/peru/error.py +++ b/peru/error.py @@ -1,3 +1,6 @@ class PrintableError(Exception): def __init__(self, message): self.message = message + + def __str__(self): + return self.message