commit c854e5dfd4bb4c784edb1c2d34f80b2ca7cbc0b5 Author: Till Maas opensource@till.name Date: Sat Dec 5 10:17:31 2015 +0100
Fix SyntaxWarning
global should be used before BZCLIENT is accessed: pkgdb2client/utils.py:51: SyntaxWarning: name 'BZCLIENT' is used prior to global declaration global BZCLIENT
pkgdb2client/utils.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py index 4b91dbe..4ca3f53 100644 --- a/pkgdb2client/utils.py +++ b/pkgdb2client/utils.py @@ -46,9 +46,9 @@ FASCLIENT = AccountSystem(
def _get_bz(): ''' Return a bugzilla object. ''' + global BZCLIENT if not BZCLIENT: try: - global BZCLIENT BZCLIENT = Bugzilla(url=RH_BZ_API) BZCLIENT.logged_in except xmlrpclib.Error:
packagedb-cli-commits@lists.stg.fedorahosted.org