From fdedacfbffaf33649c17eaf23bdbaeedcccb55d3 Mon Sep 17 00:00:00 2001 From: Yury Brodskiy Date: Tue, 1 Aug 2017 20:44:53 -0700 Subject: [PATCH] Pass proxy settings to suds library configuration. --- FuelSDK/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FuelSDK/client.py b/FuelSDK/client.py index a799965..91bff0e 100644 --- a/FuelSDK/client.py +++ b/FuelSDK/client.py @@ -9,6 +9,7 @@ import suds.client import suds.wsse from suds.sax.element import Element +import urllib2 from objects import ET_DataExtension,ET_Subscriber @@ -157,7 +158,9 @@ def build_soap_client(self): self.authObj = {'oAuth' : {'oAuthToken' : self.internalAuthToken}} self.authObj['attributes'] = { 'oAuth' : { 'xmlns' : 'http://exacttarget.com' }} - self.soap_client = suds.client.Client(self.wsdl_file_url, faults=False, cachingpolicy=1) + self.soap_client = suds.client.Client(self.wsdl_file_url, faults=False, cachingpolicy=1, + proxy=urllib2.getproxies()) + self.soap_client.set_options(location=self.endpoint) element_oAuth = Element('oAuth', ns=('etns', 'http://exacttarget.com'))