From c70f21f4fc88de257e090d4d227f4eb3218650f3 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Oct 09 2017 05:45:06 +0000 Subject: Import koji in module level Koji now supports Python 3 and shared library koji is in separate Python 3 package and be installable. So, from now on, it is safe to import koji in module level instead of inside a method. Fixes #88 Signed-off-by: Chenxiong Qi --- diff --git a/server/odcs/server/backend.py b/server/odcs/server/backend.py index af56510..848314a 100644 --- a/server/odcs/server/backend.py +++ b/server/odcs/server/backend.py @@ -21,6 +21,7 @@ # # Written by Jan Kaluza +import koji import os import threading import shutil @@ -139,8 +140,6 @@ def create_koji_session(): Creates and returns new koji_session based on the `conf.koji_profile`. """ - # We import koji here, because it does not support python3 - import koji koji_module = koji.get_profile_module(conf.koji_profile) session_opts = {} for key in ('krbservice', 'timeout', 'keepalive',