summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS.rst1
-rw-r--r--searx/https_rewrite.py9
-rw-r--r--setup.py3
3 files changed, 8 insertions, 5 deletions
diff --git a/AUTHORS.rst b/AUTHORS.rst
index 311c97781..906a0bfd6 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -26,3 +26,4 @@ generally made searx better:
- dp
- Martin Zimmermann
- @courgette
+- @kernc
diff --git a/searx/https_rewrite.py b/searx/https_rewrite.py
index b2731ae28..9faf3599d 100644
--- a/searx/https_rewrite.py
+++ b/searx/https_rewrite.py
@@ -18,7 +18,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
import re
from lxml import etree
from os import listdir
-from os.path import isfile, join
+from os.path import isfile, isdir, join
# https://gitweb.torproject.org/\
@@ -120,9 +120,10 @@ def load_single_https_ruleset(filepath):
# load all https rewrite rules
def load_https_rules(rules_path):
- # add / to path if not set yet
- if rules_path[-1:] != '/':
- rules_path += '/'
+ # check if directory exists
+ if not isdir(rules_path):
+ print("[E] directory not found: '" + rules_path + "'")
+ return
# search all xml files which are stored in the https rule directory
xml_files = [join(rules_path, f)
diff --git a/setup.py b/setup.py
index 7048fa22b..0053ca8b8 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ long_description = read('README.rst')
setup(
name='searx',
- version="0.3.1",
+ version="0.4.0",
description="A privacy-respecting, hackable metasearch engine",
long_description=long_description,
classifiers=[
@@ -70,6 +70,7 @@ setup(
'translations/*/*/*',
'templates/*/*.xml',
'templates/*/*.html',
+ 'https_rules/*.xml',
'templates/*/result_templates/*.html',
],
},