Skip to content

Commit

Permalink
examples: Use urllib3 in client example
Browse files Browse the repository at this point in the history
This is in order to not clash with theupdateframework#2762.

Signed-off-by: Jussi Kukkonen <[email protected]>
  • Loading branch information
jku committed Jan 27, 2025
1 parent 10703ac commit aa66a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/client/client
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/",
Expand Down

0 comments on commit aa66a53

Please sign in to comment.