Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

import urllib2
import json
#import ssl
import ssl
import getpass
import os
import sys
Expand All @@ -54,6 +54,9 @@
from StringIO import StringIO
import base64

#create the ssl context
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

# login function
def login():
''' Login to salesforce service using OAuth2 '''
Expand Down Expand Up @@ -94,7 +97,7 @@ def login():

# call salesforce REST API and pass in OAuth credentials
req = urllib2.Request(url, data, headers)
res = urllib2.urlopen(req)
res = urllib2.urlopen(req, context=ctx)

# load results to dictionary
res_dict = json.load(res)
Expand Down