lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.2-3-g96c8151

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

python-stdnum branch master updated. 1.2-3-g96c8151



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  96c8151e07e5800f8396d10778615024e61abc6f (commit)
       via  2881b86206f01bdc50fb5c9e171189b42ea55ebf (commit)
      from  fb0efe0e35d4dc3e3fdff87fdf5150ed3368f58d (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=96c8151e07e5800f8396d10778615024e61abc6f

commit 96c8151e07e5800f8396d10778615024e61abc6f
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Wed Oct 28 22:12:28 2015 +0100

    Fix SOAP client re-use
    
    This fixes a bug when checking re-use of the global SOAP client object.
    The object could not be evaluated in boolean context so is no explicitly
    compared to None. For suds a MethodNotFound exception would be raised
    for __nonzero__() (which Python uses for boolean comparison).

diff --git a/stdnum/eu/vat.py b/stdnum/eu/vat.py
index 5421f63..2c6728e 100644
--- a/stdnum/eu/vat.py
+++ b/stdnum/eu/vat.py
@@ -117,7 +117,7 @@ def _get_client():  # pragma: no cover (no tests for this 
function)
     # this function isn't automatically tested because the functions using
     # it are not automatically tested
     global _vies_client
-    if not _vies_client:
+    if _vies_client is None:
         try:
             from urllib import getproxies
         except ImportError:

http://arthurdejong.org/git/python-stdnum/commit/?id=2881b86206f01bdc50fb5c9e171189b42ea55ebf

commit 2881b86206f01bdc50fb5c9e171189b42ea55ebf
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Wed Oct 28 18:24:14 2015 +0100

    Fix problem with check_vies_approx()

diff --git a/stdnum/eu/vat.py b/stdnum/eu/vat.py
index 94525d5..5421f63 100644
--- a/stdnum/eu/vat.py
+++ b/stdnum/eu/vat.py
@@ -154,6 +154,6 @@ def check_vies_approx(number, requester):  # pragma: no 
cover
     # network access for the tests and unnecessarily load the VIES website
     number = compact(number)
     requester = compact(requester)
-    return _get_client.checkVatApprox(
+    return _get_client().checkVatApprox(
         countryCode=number[:2], vatNumber=number[2:],
         requesterCountryCode=requester[:2], requesterVatNumber=requester[2:])

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

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


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/