Read in and use the Sat port if applicable for Subscriptions

This commit is contained in:
Christian M. Adams 2020-12-01 15:24:13 -05:00
parent ea8ebe8a9f
commit aa7514a993

View File

@ -260,11 +260,15 @@ class Licenser(object):
def get_satellite_subs(self, host, user, pw):
port = None
try:
verify = str(self.config.get("rhsm", "repo_ca_cert"))
port = str(self.config.get("server", "port"))
except Exception as e:
logger.exception('Unable to read rhsm config to get ca_cert location. {}'.format(str(e)))
verify = getattr(settings, 'REDHAT_CANDLEPIN_VERIFY', True)
if port:
host = ':'.join([host, port])
json = []
try:
orgs = requests.get(