summaryrefslogtreecommitdiffstats
path: root/tools/scripts
diff options
context:
space:
mode:
authorSviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>2024-09-13 19:39:14 +0200
committerGitHub <noreply@github.com>2024-09-13 19:39:14 +0200
commite68370f2aa2dc0fb435de39835beb0edc1c55225 (patch)
tree6a3b7fa8675ae5bf4eda61d2890edf44246ff84e /tools/scripts
parent🧪 Upload the `devel` branch coverage to Codecov (#15507) (diff)
downloadawx-e68370f2aa2dc0fb435de39835beb0edc1c55225.tar.xz
awx-e68370f2aa2dc0fb435de39835beb0edc1c55225.zip
Replace `pkg_resources` with `importlib.metadata` (#15441)
Diffstat (limited to 'tools/scripts')
-rwxr-xr-xtools/scripts/firehose.py5
1 files changed, 2 insertions, 3 deletions
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()