borni-dhifi / vatnumber

Automatically exported from code.google.com/p/vatnumber
GNU General Public License v3.0
0 stars 0 forks source link

vatnumber does not recognize / use system proxy settings #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
this works

    from suds.client import Client
    proxyOpts = dict(http = 'http://my_proxy:3128')
    client = Client(VIES_URL,proxy=proxyOpts)

Original issue reported on code.google.com by chricar...@gmail.com on 5 Jun 2013 at 8:57

GoogleCodeExporter commented 8 years ago

Original comment by cedric.krier@b2ck.com on 5 Jun 2013 at 12:31

GoogleCodeExporter commented 8 years ago
Hello!
a better now teted solution

from suds.client import Client
proxy = os.environ.get('HTTP_PROXY') or os.environ.get('http_proxy')
if proxy:
    proxyOpts = dict(http = proxy)
else:
    proxyOpts = {}
client = 
Client("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl",proxy=pr
oxyOpts)

Original comment by chricar...@gmail.com on 5 Jun 2013 at 5:24

GoogleCodeExporter commented 8 years ago
Indeed I find this way easier:

http://codereview.appspot.com/10059044

Original comment by cedric.krier@b2ck.com on 5 Jun 2013 at 7:01

GoogleCodeExporter commented 8 years ago
Fixed with r4d5e8be082d1

Original comment by cedric.krier@b2ck.com on 14 Jul 2013 at 6:59