Skip to content

Commit

Permalink
Fix a bug with the fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
palikar committed Aug 20, 2020
1 parent c27ddff commit 119f4d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code_manager/core/fetcher.py
Expand Up @@ -35,7 +35,7 @@ def __init__(self):
self.archive_extensions = Fetcher.ARCH_EXTENSIONS
self.extract_queue = []

def download(self, name, root, _): # pylint: disable=R0201,R0915
def download(self, name, root): # pylint: disable=R0201,R0915
assert name is not None
assert root is not None

Expand Down
7 changes: 3 additions & 4 deletions code_manager/core/manager.py
Expand Up @@ -67,7 +67,7 @@ def _invoke(self):
if self.build:
self._invoke_build()

def _do_fetch(self, pack, root=None, node=None):
def _do_fetch(self, pack, node=None):
root_dir = self._get_root(pack)

with self.cache as cache:
Expand All @@ -86,7 +86,7 @@ def _do_fetch(self, pack, root=None, node=None):
self.packages[pack],
) if node is None else node

if self.fetcher.download(pack, root, node) is None:
if self.fetcher.download(pack, root_dir) is None:
logging.critical("The fetching of '%s' in '%s'failed.", pack, root_dir)
cache.set_fetched(pack, True)
cache.set_root(pack, root_dir)
Expand Down Expand Up @@ -136,10 +136,9 @@ def _invoke_install(self):
self._check_install_nodes(ordered_packages)

for pack in ordered_packages:
root = self._get_root(pack)
node = self._expand_node(self.packages[pack])

self._do_fetch(pack, root=root, node=node)
self._do_fetch(pack, node=node)

if self.dep_depender.check(pack) != 0:
raise SystemExit
Expand Down

0 comments on commit 119f4d4

Please sign in to comment.