# I don't like how dirty this is. Could be made way easier and neater.
def create_koji_session(config_name: str) -> koji.ClientSession:
koji_config = koji.read_config(config_name)
koji_session_opts = koji.grab_session_options(koji_config)
koji_session = koji.ClientSession(koji_config['server'], koji_session_opts)
koji_session.gssapi_login()
koji_session.exclusiveSession(force=True) # Without this Koji doesn't want to be nice if we ctrl-c
return koji_session
Basically make it so we don't need to use exclusiveSession and can possibly handle connections correctly.
Basically make it so we don't need to use exclusiveSession and can possibly handle connections correctly.