diff options
author | Alexandre Flament <alex@al-f.net> | 2015-04-26 18:58:31 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2015-04-26 18:58:31 +0200 |
commit | 187617498a0dea17e51950f1ad5e96bb4826367d (patch) | |
tree | a53fd9de463db62ad8cee29c22fa376b2141877e /searx/webapp.py | |
parent | 2be52b74ad9e30474d553750d802199ee8cc4844 (diff) | |
download | searxng-187617498a0dea17e51950f1ad5e96bb4826367d.tar.gz searxng-187617498a0dea17e51950f1ad5e96bb4826367d.zip |
Log an error if the ndg-httpsclient, pyopenssl and pyasn1 packages are not installed.
See #298
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 13c965e0d..38780220e 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -61,6 +61,16 @@ except: from sys import exit exit(1) +# check if the pyopenssl, ndg-httpsclient, pyasn1 packages are installed. +# They are needed for SSL connection without trouble, see #298 +try: + import OpenSSL.SSL # NOQA + import ndg.httpsclient # NOQA + import pyasn1 # NOQA +except ImportError: + logger.critical("The pyopenssl, ndg-httpsclient, pyasn1 packages have to be installed.\n" + "Some HTTPS connections will failed") + logger = logger.getChild('webapp') |