summaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl/_operations
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-23 09:26:16 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:52 +0200
commit5fefb11ffd50dcda826cd5a256c8b3f650221050 (patch)
treed98721a1b054b894e282668aea79157788903e73 /src/hydrilla/proxy/state_impl/_operations
parentc100476b0a34f5098efc96bf2487f09b66b4a6c4 (diff)
downloadhaketilo-hydrilla-5fefb11ffd50dcda826cd5a256c8b3f650221050.tar.gz
haketilo-hydrilla-5fefb11ffd50dcda826cd5a256c8b3f650221050.zip
introduce package installation state enum
Diffstat (limited to 'src/hydrilla/proxy/state_impl/_operations')
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py7
1 files changed, 5 insertions, 2 deletions
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