forked from pool/python-bugzilla
* backport --outputformat feature from git OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bugzilla?expand=0&rev=16
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 1a37173fc0e63f116878d6e99718ae12708a3174 Mon Sep 17 00:00:00 2001
|
|
From: Will Woods <wwoods@redhat.com>
|
|
Date: Mon, 13 Jun 2011 18:02:27 -0400
|
|
Subject: [PATCH 07/17] fixup for cli speedup with query --outputformat
|
|
|
|
Forgot to initialize a variable. whoops.
|
|
---
|
|
bin/bugzilla | 7 ++++---
|
|
1 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/bin/bugzilla b/bin/bugzilla
|
|
index 833c5a2..b0eeeaa 100755
|
|
--- a/bin/bugzilla
|
|
+++ b/bin/bugzilla
|
|
@@ -555,11 +555,12 @@ def main():
|
|
'target_milestone', 'short_desc', 'flags', 'keywords', 'blockedby' ]
|
|
if opt.outputformat:
|
|
aliases = dict(bz.field_aliases)
|
|
+ req_fields = []
|
|
for fieldname, sub in format_field_re.findall(opt.outputformat):
|
|
- fields.append(fieldname)
|
|
+ req_fields.append(fieldname)
|
|
if fieldname in aliases:
|
|
- fields.append(aliases.get(fieldname))
|
|
- q['column_list'] = fields
|
|
+ req_fields.append(aliases.get(fieldname))
|
|
+ q['column_list'] = req_fields
|
|
|
|
log.debug("bz.query: %s", q)
|
|
if not q:
|
|
--
|
|
1.7.6
|
|
|