From aa66a539cf024ecac122180c42ac5b8e59d71247 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Mon, 27 Jan 2025 15:17:49 +0200 Subject: [PATCH] examples: Use urllib3 in client example This is in order to not clash with #2762. Signed-off-by: Jussi Kukkonen --- examples/client/client | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/client/client b/examples/client/client index 218b928019..01d18a54d1 100755 --- a/examples/client/client +++ b/examples/client/client @@ -12,7 +12,7 @@ import traceback from hashlib import sha256 from pathlib import Path -import requests +import urllib3 from tuf.api.exceptions import DownloadError, RepositoryError from tuf.ngclient import Updater @@ -41,7 +41,7 @@ def init_tofu(base_url: str) -> bool: if not os.path.isdir(metadata_dir): os.makedirs(metadata_dir) - data = requests.get(f"{base_url}/metadata/1.root.json").content + data = urllib3.request("GET", f"{base_url}/metadata/1.root.json").data Updater( metadata_dir=metadata_dir, metadata_base_url=f"{base_url}/metadata/",