Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #8 from rdmrocha/master
Browse files Browse the repository at this point in the history
correctly importing ssl and implementing a workaround for unverified …
  • Loading branch information
Bob123a1 authored Aug 15, 2018
2 parents 4a845bc + ebb7556 commit db5076a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CDNSP-GUI-Bob.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,21 @@ def add_to_installed(tid, ver):
from bs4 import BeautifulSoup

try:
import pyopenssl
import ssl
except:
pass
install_module("pyopenssl")
import ssl

ssl._create_default_https_context = ssl._create_unverified_context

req_file = ["CDNSPconfig.json", "keys.txt", "nx_tls_client_cert.pem", "titlekeys.txt", "titlekeys_overwrite.txt"]
try:
for file in req_file:
check_req_file(file)
print(_("Everything looks good!"))
except:
print(_("Unable to get required files! Check your internet connection"))
except Exception as e:
print(_("Unable to get required files! Check your internet connection: [{}]".format(str(e))))

# CDNSP script

import argparse
Expand Down

0 comments on commit db5076a

Please sign in to comment.