From e68370f2aa2dc0fb435de39835beb0edc1c55225 Mon Sep 17 00:00:00 2001 From: "Sviatoslav Sydorenko (Святослав Сидоренко)" Date: Fri, 13 Sep 2024 19:39:14 +0200 Subject: Replace `pkg_resources` with `importlib.metadata` (#15441) --- tools/scripts/firehose.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/scripts/firehose.py b/tools/scripts/firehose.py index 4755cdf463..69a1c40ec8 100755 --- a/tools/scripts/firehose.py +++ b/tools/scripts/firehose.py @@ -30,8 +30,7 @@ import datetime import itertools import json import multiprocessing -import pkg_resources -import random +import site import subprocess import sys from io import StringIO @@ -132,7 +131,7 @@ def cleanup(sql): def generate_jobs(jobs, batch_size, time_delta): print(f'inserting {jobs} job(s)') - sys.path.insert(0, pkg_resources.get_distribution('awx').module_path) + sys.path[:0] = site.getsitepackages() from awx import prepare_env prepare_env() -- cgit v1.2.3