Merge "add verbose mode to graph cmd"

This commit is contained in:
Jenkins 2014-09-29 01:13:33 +00:00 committed by Gerrit Code Review
commit ee84691e1d
1 changed files with 8 additions and 0 deletions

View File

@ -24,12 +24,15 @@ from launchpadlib import launchpad
import requests
import elastic_recheck.elasticRecheck as er
from elastic_recheck import log as logging
from elastic_recheck import results as er_results
STEP = 3600000
LPCACHEDIR = os.path.expanduser('~/.launchpadlib/cache')
LOG = logging.getLogger('ergraph')
def get_launchpad_bug(bug):
lp = launchpad.Launchpad.login_anonymously('grabbing bugs',
@ -69,6 +72,9 @@ def main():
help='output filename')
parser.add_argument('-q', dest='queue',
help='limit results to a specific query')
parser.add_argument('-v', dest='verbose',
action='store_true', default=False,
help='print out details as we go')
args = parser.parse_args()
classifier = er.Classifier(args.queries)
@ -94,6 +100,8 @@ def main():
args.queue)
if query.get('suppress-graph'):
continue
if args.verbose:
LOG.debug("Starting query for bug %s" % query['bug'])
urlq = dict(search=query['query'],
fields=[],
offset=0,