on master help sign in
Merge remote-tracking branch 'origin/ssl' into https
commit8806002886eeb998df54f3b44d8ad43513f58880 authorAlexandre Flament <alex@al-f.net> dateSun 26 Apr 2015, 19:12 (12 years ago) parent99efd791876174
1 file changed+10
searx/webapp.py+10
searx/webapp.py+10
@@ -61,6 +61,16 @@ except:
6161 from sys import exit
6262 exit(1)
6363
64+# check if the pyopenssl, ndg-httpsclient, pyasn1 packages are installed.
65+# They are needed for SSL connection without trouble, see #298
66+try:
67+ import OpenSSL.SSL # NOQA
68+ import ndg.httpsclient # NOQA
69+ import pyasn1 # NOQA
70+except ImportError:
71+ logger.critical("The pyopenssl, ndg-httpsclient, pyasn1 packages have to be installed.\n"
72+ "Some HTTPS connections will failed")
73+
6474
6575logger = logger.getChild('webapp')
6676