Commit 70574784 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

fixed new python tls protocol

parent 6cc9560d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ PySEN revision module
"""
import sys
__version__  = "1.3"
__release__  = "beta1"
__date__     = "Feb 17, 2023"
__release__  = "b2"
__date__     = "Feb 28, 2023"

def version(full=False):
    "get pysen version number"
+3 −1
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ url2=r'https://snsapp1.sns.ornl.gov/xprod_ro/proposal_production/express/getTitl
def get_json_uri(uri):
    "get json from uri"
    req  = urllib.request.Request(uri)
    cont = ssl.SSLContext(ssl.PROTOCOL_TLS)
    cont = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
    cont.check_hostname = False
    cont.verify_mode = ssl.CERT_NONE
    resp = urllib.request.urlopen(req, context=cont) #pylint: disable=consider-using-with
    return json.loads(resp.read())