Commit dbdea2a0 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Partially revert previous commit (remove file-urlmd5-exclude option)

We want buildout to cache as many things as possible.

This partially reverts commit 10478e98.
parent 10478e98
Pipeline #33760 failed with stage
in 0 seconds
......@@ -525,13 +525,6 @@ class Buildout(DictMixin):
except Exception:
self._logger.exception(
"Failed to setup Networkcache. Continue without.")
else:
networkcache_client._buildout_download_filter = match_list = []
for pattern in networkcache_section.get('file-urlmd5-exclude',
'').split():
include = pattern.startswith('!')
match_list.append((not include,
re.compile(pattern[include:]).match))
def _buildout_path(self, name):
if '${' in name:
......
......@@ -300,9 +300,7 @@ class Download(Download):
def _download(self, url, path, md5sum=None, alternate_url=None):
from .buildout import networkcache_client as nc
while nc: # not a loop
if (self._auth(url) # do not cache restricted data
or next((x for x, match in nc._buildout_download_filter
if match(url)), False)):
if self._auth(url): # do not cache restricted data
nc = None
break
key = 'file-urlmd5:' + md5(url.encode()).hexdigest()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment