From 2405c89652607261587cfd619c723c805c2cf852 Mon Sep 17 00:00:00 2001 From: Jussi Räsänen Date: Wed, 5 Mar 2014 18:57:34 +0200 Subject: Added a simple backwards compability check --- stdnum/eu/vat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdnum/eu/vat.py b/stdnum/eu/vat.py index 460bb38..573852c 100644 --- a/stdnum/eu/vat.py +++ b/stdnum/eu/vat.py @@ -125,6 +125,9 @@ def check_vies(number): # pragma: no cover (no tests for this function) global _vies_client if not _vies_client: from suds.client import Client - from urllib import getproxies + try: + from urllib import getproxies + except ImportError: + from urllib.request import getproxies _vies_client = Client(vies_wsdl, proxy=getproxies()) return _vies_client.service.checkVat(number[:2], number[2:]) -- cgit v1.2.3