lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.17-51-g45f098b

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 1.17-51-g45f098b



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  45f098b3664a11ef51cd66a11773bab923b02c91 (commit)
      from  a2180326ed1ae201400bed1b4ea5074847841957 (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 -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=45f098b3664a11ef51cd66a11773bab923b02c91

commit 45f098b3664a11ef51cd66a11773bab923b02c91
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Nov 12 17:52:47 2022 +0100

    Make all exceptions inherit from ValueError
    
    All the validation exceptions (subclasses of ValidationError) are raised
    when a number is provided with an inappropriate value.

diff --git a/stdnum/exceptions.py b/stdnum/exceptions.py
index 0cb8f12..7a8aacb 100644
--- a/stdnum/exceptions.py
+++ b/stdnum/exceptions.py
@@ -1,7 +1,7 @@
 # exceptions.py - collection of stdnum exceptions
 # coding: utf-8
 #
-# Copyright (C) 2013 Arthur de Jong
+# Copyright (C) 2013-2022 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@ __all__ = ['ValidationError', 'InvalidFormat', 
'InvalidChecksum',
            'InvalidLength', 'InvalidComponent']
 
 
-class ValidationError(Exception):
+class ValidationError(ValueError):
     """Top-level error for validating numbers.
 
     This exception should normally not be raised, only subclasses of this

-----------------------------------------------------------------------

Summary of changes:
 stdnum/exceptions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
python-stdnum