python-stdnum branch master updated. 1.4-1-gd95382f
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum branch master updated. 1.4-1-gd95382f
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org
- Subject: python-stdnum branch master updated. 1.4-1-gd95382f
- Date: Sun, 28 Aug 2016 11:55:04 +0200 (CEST)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".
The branch, master has been updated
via d95382fddb759b7e8d81964cf446bc32ab274b42 (commit)
from 01a7f34edc5d09d800f43e4fee966b2e7ea6ad3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://arthurdejong.org/git/python-stdnum/commit/?id=d95382fddb759b7e8d81964cf446bc32ab274b42
commit d95382fddb759b7e8d81964cf446bc32ab274b42
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Aug 28 11:02:31 2016 +0200
Properly print error message of exceptions
This ensures that the message passed to the constructor is shown in the
traceback while falling back to the class default.
diff --git a/stdnum/exceptions.py b/stdnum/exceptions.py
index 733b525..029b95e 100644
--- a/stdnum/exceptions.py
+++ b/stdnum/exceptions.py
@@ -32,7 +32,7 @@ class ValidationError(Exception):
exception."""
def __str__(self):
- return getattr(self, 'message', '')
+ return ''.join(self.args[:1]) or getattr(self, 'message', '')
class InvalidFormat(ValidationError):
-----------------------------------------------------------------------
Summary of changes:
stdnum/exceptions.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
python-stdnum
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/python-stdnum-commits/
- python-stdnum branch master updated. 1.4-1-gd95382f,
Commits of the python-stdnum project