def _get_bz(url=pkgdb2client.BZ_URL, insecure=False): ''' Return a bugzilla object. ''' global BZCLIENT if not BZCLIENT or BZCLIENT.url != url: BZCLIENT = Bugzilla(url=url) BZCLIENT._sslverify = not insecure try: BZCLIENT.logged_in except xmlrpclib.Error: bz_login() return BZCLIENT
def _get_bz(url=RH_BZ_API, insecure=False): ''' Return a bugzilla object. ''' global BZCLIENT if not BZCLIENT: BZCLIENT = Bugzilla(url=url) elif BZCLIENT.url != url: BZCLIENT.url = url BZCLIENT._sslverify = not insecure try: BZCLIENT.logged_in except xmlrpclib.Error: bz_login() return BZCLIENT