Skip to content

Commit 83347de

Browse files
author
Caleb Hyde
committed
Allow for and in init params
1 parent 4de0284 commit 83347de

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

FuelSDK/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ def __init__(self, get_server_wsdl = False, debug = False, params = None):
4949
else:
5050
config.read('config.python')
5151

52-
if config.has_option('Web Services', 'clientid'):
52+
if(params is not None and 'client_id' in params):
53+
self.client_id = params['client_id']
54+
elif config.has_option('Web Services', 'clientid'):
5355
self.client_id = config.get('Web Services', 'clientid')
5456
elif 'FUELSDK_CLIENT_ID' in os.environ:
5557
self.client_id = os.environ['FUELSDK_CLIENT_ID']
5658

57-
if config.has_option('Web Services', 'clientsecret'):
59+
if(params is not None and 'client_secret' in params):
60+
self.client_secret = params['client_secret']
61+
elif config.has_option('Web Services', 'clientsecret'):
5862
self.client_secret = config.get('Web Services', 'clientsecret')
5963
elif 'FUELSDK_CLIENT_SECRET' in os.environ:
6064
self.client_secret = os.environ['FUELSDK_CLIENT_SECRET']

0 commit comments

Comments
 (0)