aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjahoti <jahoti@tilde.team>2021-08-22 00:00:00 +0000
committerjahoti <jahoti@tilde.team>2021-08-22 00:00:00 +0000
commitbb550c369ab7239c2f8c630a2bc947cc8744a564 (patch)
tree3e7f7a7e98e56cce74e9186e5700fd71dda54f9b
parent9e280d4527e57cb4037fd81fb433c16f165de094 (diff)
downloadbrowser-extension-bb550c369ab7239c2f8c630a2bc947cc8744a564.tar.gz
browser-extension-bb550c369ab7239c2f8c630a2bc947cc8744a564.zip
Incorporate patch for test/gorilla.py
Patch by Wojtek provides a bundle-all option and only reads Hydrilla files.
-rw-r--r--copyright9
-rwxr-xr-xtest/gorilla.py12
2 files changed, 18 insertions, 3 deletions
diff --git a/copyright b/copyright
index 11a8e4f..23ffb73 100644
--- a/copyright
+++ b/copyright
@@ -56,6 +56,10 @@ Copyright: 2005-2021 Giorgio Maone - https://maone.net
2021 jahoti <jahoti@tilde.team>
License: GPL-2+
+Files: test/*
+Copyright: 2021 jahoti <jahoti@tilde.team>
+License: AGPL-3+
+
Files: test/proxy_core.py test/init.sh
Copyright: 2015, inaz2
2021 jahoti <jahoti@tilde.team>
@@ -85,9 +89,10 @@ License: BSD-3
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Files: test/server.py
+Files: test/gorilla.py
Copyright: 2021 jahoti <jahoti@tilde.team>
-License: AGPL-3+
+ 2021 jahoti <jahoti@tilde.team>
+License: AGPL-3+ or Alicense-1.0
Files: licenses/*
Copyright: 2001, 2002, 2011-2013 Creative Commons
diff --git a/test/gorilla.py b/test/gorilla.py
index cd6cc94..5bf64f5 100755
--- a/test/gorilla.py
+++ b/test/gorilla.py
@@ -18,7 +18,12 @@ def load_db(path):
DB['path'] = path
for file in os.listdir(path):
- with open(path + file + os.sep + 'index.json') as f:
+ subdir = path + file
+
+ if (os.st.S_IFMT(os.stat(subdir).st_mode) & os.st.S_IFDIR) == 0:
+ continue
+
+ with open(subdir + os.sep + 'index.json') as f:
data = json.load(f)
type_, data['file'] = data['type'], file
@@ -34,6 +39,11 @@ def load_db(path):
def mkhachette(patterns):
+ patterns = set(patterns)
+ if '*' in patterns:
+ patterns.remove('*')
+ patterns.update(DB['page'].keys())
+
scripts, bags, pages, new_bags = {}, {}, {}, []
for pattern in patterns:
pages[pattern] = data = DB['page'][pattern]