tags 803316 +patch
thanks

here's a patch

On Wed, Oct 28, 2015 at 06:19:26PM +0100, Lionel Elie Mamane wrote:

> $ python
> Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
> [GCC 4.9.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import stdnum.eu.vat
> >>> stdnum.eu.vat.check_vies_approx('BE555445','BE87785')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/dist-packages/stdnum/eu/vat.py", line 157, in 
> check_vies_approx
>     return _get_client.checkVatApprox(
> AttributeError: 'function' object has no attribute 'checkVatApprox'
--- /usr/lib/python2.7/dist-packages/stdnum/eu/vat.py~	2015-10-11 11:18:46.000000000 +0200
+++ /usr/lib/python2.7/dist-packages/stdnum/eu/vat.py	2015-10-28 18:24:14.451553932 +0100
@@ -154,6 +154,6 @@
     # 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:])

Reply via email to