diff --git a/pagure-sync-bugzilla.py b/pagure-sync-bugzilla.py index 70b2e75..ed28202 100644 --- a/pagure-sync-bugzilla.py +++ b/pagure-sync-bugzilla.py @@ -30,29 +30,28 @@ This ... script takes information about package onwership and imports it into bugzilla. ''' -import re import argparse import datetime -import time -import sys -import os +from email.message import EmailMessage import itertools import json -import xmlrpc.client -import smtplib -import traceback import multiprocessing.pool -from email.message import EmailMessage +import os +import re +import smtplib +import sys +import time +import traceback +import xmlrpc.client -import bugzilla as bugzilla_lib +from bugzilla import Bugzilla import dogpile.cache -import requests -import yaml import fedora.client from fedora.client.fas2 import AccountSystem - +import requests from requests.adapters import HTTPAdapter from urllib3.util import Retry +import yaml env = 'staging' @@ -282,7 +281,7 @@ class BugzillaProxy: self.username = username self.password = password - self.server = bugzilla_lib.Bugzilla( + self.server = Bugzilla( url=self.bzXmlRpcServer, user=self.username, password=self.password) @@ -588,6 +587,7 @@ def _get_pdc_branches(session, repo): data = rv.json() return [branch['name'] for branch in data['results']] + def _is_retired(product, project): branches = project['branches'] if product == 'Fedora EPEL': @@ -751,8 +751,8 @@ if __name__ == '__main__': products.add(NAMESPACE_TO_PRODUCT[project['namespace']]) project['products'] = list(products) - ## Now, we must transform the data we collected into something that PkgDB - ## would have returned + # Now, we must transform the data we collected into something that PkgDB + # would have returned p_to_legacy_schema = resilient_partial(_to_legacy_schema, session=session) items = [ (product, project) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0749e7b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +[flake8] +show-source = True +max-line-length = 100 +exclude = .git,.tox,dist,*egg,build,tools +#ignore = + +# Configure flake8-import-order +#application-import-names = +import-order-style = google