| |
@@ -13,17 +13,18 @@
|
| |
import sys
|
| |
|
| |
import requests
|
| |
- import toml
|
| |
from requests.packages.urllib3.util import retry
|
| |
+ import toml
|
| |
|
| |
try:
|
| |
import tqdm
|
| |
except ImportError:
|
| |
tqdm = None
|
| |
|
| |
- from toddlers.base import ToddlerBase
|
| |
- import toddlers.utils.fedora_account
|
| |
- import toddlers.utils.bugzilla_system
|
| |
+ from ..base import ToddlerBase
|
| |
+ from ..utils import bugzilla_system
|
| |
+ from ..utils import fedora_account
|
| |
+
|
| |
|
| |
_log = logging.getLogger(__name__)
|
| |
|
| |
@@ -67,14 +68,12 @@
|
| |
raise
|
| |
|
| |
_log.info("Setting up connection to FAS")
|
| |
- toddlers.utils.fedora_account.set_fas(config)
|
| |
+ fedora_account.set_fas(config)
|
| |
|
| |
if not username:
|
| |
# Retrieve all the packagers in FAS:
|
| |
_log.info("Retrieving the list of packagers in FAS")
|
| |
- fas_packagers = sorted(
|
| |
- toddlers.utils.fedora_account.get_group_member("packager")
|
| |
- )
|
| |
+ fas_packagers = sorted(fedora_account.get_group_member("packager"))
|
| |
else:
|
| |
fas_packagers = [username]
|
| |
|
| |
@@ -96,19 +95,15 @@
|
| |
_log.debug(
|
| |
f" Retrieving bz email of user {username}: {idx}/{n_packagers}"
|
| |
)
|
| |
- bz_email = toddlers.utils.fedora_account.get_bz_email_user(
|
| |
- username, email_overrides
|
| |
- )
|
| |
+ bz_email = fedora_account.get_bz_email_user(username, email_overrides)
|
| |
fas_packagers_info[bz_email] = username
|
| |
|
| |
_log.info("Setting up connection to bugzilla")
|
| |
- toddlers.utils.bugzilla_system.set_bz(config)
|
| |
+ bugzilla_system.set_bz(config)
|
| |
|
| |
# Retrieve all the packagers in bugzilla
|
| |
_log.info("Retrieving the list of packagers in bugzilla")
|
| |
- bz_packagers = toddlers.utils.bugzilla_system.get_group_member(
|
| |
- config["bugzilla_group"]
|
| |
- )
|
| |
+ bz_packagers = bugzilla_system.get_group_member(config["bugzilla_group"])
|
| |
n_bz_packagers = len(bz_packagers)
|
| |
_log.info(
|
| |
f"{n_bz_packagers} members of {config['bugzilla_group']} found in bugzilla"
|
| |
@@ -130,7 +125,7 @@
|
| |
# Add the packagers found only in FAS to the bugzilla group
|
| |
_log.info(f"Adding to {config['bugzilla_group']} the packagers found in FAS")
|
| |
for user_email in sorted(fas_only):
|
| |
- no_bz_account = toddlers.utils.bugzilla_system.add_user_to_group(
|
| |
+ no_bz_account = bugzilla_system.add_user_to_group(
|
| |
user_email=user_email,
|
| |
bz_group=config["bugzilla_group"],
|
| |
no_bz_account=no_bz_account,
|
| |
importlib.import_module()
rather than.__import__()