From 22acb41ed563502475603acecd289fb3cd36862b Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Feb 07 2018 09:41:13 +0000 Subject: Fix an import traceback that happened sometimes with fedora.client.fas2 --- diff --git a/hubs/fas/fasclient.py b/hubs/fas/fasclient.py index 831dcad..382b756 100644 --- a/hubs/fas/fasclient.py +++ b/hubs/fas/fasclient.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import datetime import logging -import fedora +from fedora.client.fas2 import AccountSystem from iso3166 import countries from pytz import timezone @@ -22,7 +22,7 @@ class FASClient(object): def __init__(self, client=None): if client is None: fedmsg_config = get_fedmsg_config() - client = fedora.client.fas2.AccountSystem( + client = AccountSystem( username=fedmsg_config["fas_credentials"]["username"], password=fedmsg_config["fas_credentials"]["password"], ) diff --git a/hubs/utils/fedmsg.py b/hubs/utils/fedmsg.py index 30544b0..82f49ce 100644 --- a/hubs/utils/fedmsg.py +++ b/hubs/utils/fedmsg.py @@ -9,9 +9,6 @@ import fedmsg.meta from hubs.default_fedmsg_config import config as default_fedmsg_config -TOPIC_PREFIX = "org.fedoraproject.hubs" - - def get_fedmsg_config(): try: filenames = [os.environ["FEDMSG_CONFIG"]]