Make KojiWrapper support krb_login with keytab
Using getattr so we also work with versions of koji that do not read principal and keytab from the config file. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
c41c46403a
commit
c0c3e2e79d
|
@ -55,7 +55,9 @@ class KojiWrapper(object):
|
||||||
os.path.expanduser(self.koji_module.config.ca),
|
os.path.expanduser(self.koji_module.config.ca),
|
||||||
os.path.expanduser(self.koji_module.config.serverca))
|
os.path.expanduser(self.koji_module.config.serverca))
|
||||||
elif auth_type == 'kerberos':
|
elif auth_type == 'kerberos':
|
||||||
self.koji_proxy.krb_login()
|
self.koji_proxy.krb_login(
|
||||||
|
getattr(self.koji_module.config, 'principal', None),
|
||||||
|
getattr(self.koji_module.config, 'keytab', None))
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('Unsupported authentication type in Koji')
|
raise RuntimeError('Unsupported authentication type in Koji')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue