Skip to content

Commit 8ef8323

Browse files
committed
base: Move readconfig() call before session setup
Otherwise we don't pull api_key and other values from the rc file, which is needed for proper session init Signed-off-by: Cole Robinson <[email protected]>
1 parent 1de6a2f commit 8ef8323

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bugzilla/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,10 @@ def connect(self, url=None):
471471
url = self.url
472472
url = self.fix_url(url)
473473

474+
self.url = url
475+
# we've changed URLs - reload config
476+
self.readconfig(overwrite=False)
477+
474478
self._session = _BugzillaSession(url, self.user_agent,
475479
cookiejar=self._cookiejar,
476480
sslverify=self._sslverify,
@@ -480,10 +484,6 @@ def connect(self, url=None):
480484
backendclass = self._get_backend_class()
481485
self._backend = backendclass(url, self._session)
482486

483-
self.url = url
484-
# we've changed URLs - reload config
485-
self.readconfig(overwrite=False)
486-
487487
if (self.user and self.password):
488488
log.info("user and password present - doing login()")
489489
self.login()

0 commit comments

Comments
 (0)