Skip to content

Commit

Permalink
Remove unnecessary f-strings and allow global offline_token setting
Browse files Browse the repository at this point in the history
  • Loading branch information
synkd committed Jul 29, 2022
1 parent 6cef8c7 commit e9cdf5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manifester/manifester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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}."
)

Expand Down
1 change: 1 addition & 0 deletions manifester_settings.yaml.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e9cdf5a

Please sign in to comment.