From da1e9fd7c1236b17590946aff5a7ae638d50c6df Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Wed, 1 Nov 2017 12:13:45 +0100 Subject: Only call osc.conf.get_config() when needed osc.conf.get_config() can cause calls to password managers like kwallet. Move this action from module init to the functions that actually need to access the OBS api and require authentication. We also cache the results in a local variable now. --- obsapi/core.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'obsapi/core.py') diff --git a/obsapi/core.py b/obsapi/core.py index 5200efe..090c953 100644 --- a/obsapi/core.py +++ b/obsapi/core.py @@ -8,12 +8,6 @@ from obsapi.sourceapi import ObsSourceApi from obsapi.buildapi import ObsBuildApi from obsapi.formatter import Formatter -try: - import osc.conf as osc_conf - osc_conf.get_config() -except: - osc_conf = None - LSItem = namedtuple('LSItem', 'name md5 size mtime') Directory = namedtuple('Directory', 'name rev vrev srcmd5') -- cgit v1.2.3