diff --git a/manifester/manifester.py b/manifester/manifester.py index 9433176..3619ab1 100644 --- a/manifester/manifester.py +++ b/manifester/manifester.py @@ -17,7 +17,7 @@ def __init__(self, manifest_category, allocation_name=None, **kwargs): ) self.manifest_data = settings.manifest_category.get(manifest_category) self.offline_token = kwargs.get( - "offline_token", self.manifest_data.offline_token + "offline_token", self.manifest_data.get("offline_token", settings.offline_token) ) self.subscription_data = self.manifest_data.subscription_data self.sat_version = kwargs.get("sat_version", self.manifest_data.sat_version) @@ -212,7 +212,7 @@ def process_subscription_pools(self, subscription_pools, subscription_data): else: logger.debug( f"Received response status {add_entitlements.status_code}." - f"Trying to find another pool." + "Trying to find another pool." ) self._subscription_pools = None subscription_data["quantity"] -= self.attached_quantity @@ -234,7 +234,7 @@ def process_subscription_pools(self, subscription_pools, subscription_data): break else: raise Exception( - f"Something went wrong while adding entitlements. Received response status " + "Something went wrong while adding entitlements. Received response status " f"{add_entitlements.status_code}." ) diff --git a/manifester_settings.yaml.example b/manifester_settings.yaml.example index f949757..d3f5f30 100644 --- a/manifester_settings.yaml.example +++ b/manifester_settings.yaml.example @@ -1,5 +1,6 @@ #rhsm-manifester settings log_level: "info" +offline_token: "" manifest_category: golden_ticket: # An offline token can be generated at https://access.redhat.com/management/api