From 5fefb11ffd50dcda826cd5a256c8b3f650221050 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 23 Aug 2022 09:26:16 +0200 Subject: introduce package installation state enum --- .../proxy/state_impl/_operations/recompute_dependencies.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/hydrilla/proxy/state_impl/_operations') diff --git a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py index f83eb09..2b18a51 100644 --- a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py +++ b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py @@ -31,9 +31,12 @@ # Enable using with Python 3.7. from __future__ import annotations +import sqlite3 import typing as t -import sqlite3 +from urllib.parse import urlparse, urljoin + +import requests from .... import item_infos from ... import simple_dependency_satisfying as sds @@ -260,7 +263,7 @@ def _pull_missing_files(cursor: sqlite3.Cursor) -> None: rows = cursor.fetchall() - for file_id, sha56, repo_id, repo_url in rows: + for file_id, sha256, repo_id, repo_url in rows: try: response = requests.get(urljoin(repo_url, f'file/sha256/{sha256}')) assert response.ok -- cgit v1.2.3