From 6d88b67b64ddcf3e079cb98c0deb021930b7f921 Mon Sep 17 00:00:00 2001 From: Daniel Van Der Maden Date: Mon, 22 Jun 2020 12:46:25 -0700 Subject: [PATCH] [scripts] Ignore SSL check for hmy-csv.py --- scripts/hmy-csv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/hmy-csv.py b/scripts/hmy-csv.py index 3553d5e..561f95a 100755 --- a/scripts/hmy-csv.py +++ b/scripts/hmy-csv.py @@ -33,6 +33,7 @@ import subprocess import urllib.request import urllib.error import json +import ssl script_directory = os.path.dirname(os.path.realpath(__file__)) _hmy_call_and_prefix = [f"{script_directory}/hmy"] @@ -226,7 +227,7 @@ def sanity_check(args): assert os.path.isfile(args.path), f"{args.path} is not a file" assert os.path.exists(args.path), f"{args.path} does not exist" try: - return_code = urllib.request.urlopen(args.node).getcode() + return_code = urllib.request.urlopen(args.node, context=ssl._create_unverified_context()).getcode() except (urllib.error.HTTPError, urllib.error.URLError) as e: raise RuntimeError(f"unable to connect to node {args.node}") from e assert return_code == 200, f"bad response code ({return_code}) from node {args.node}"