[python-bugzilla] [PATCH] Add flags_requestee as an outputformat specifier
Lon Hohberger
lhh at redhat.com
Fri Jan 17 16:19:01 UTC 2014
Some bugzilla instances (like Red Hat's) allow for
flags to have a requestee - the most common is the
'needinfo' flag. It's helpful to know who the bug
needs information from, so this allows providing
that information without breaking the existing output
format.
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
bin/bugzilla | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/bin/bugzilla b/bin/bugzilla
index 0ded73e..65c1f48 100755
--- a/bin/bugzilla
+++ b/bin/bugzilla
@@ -766,6 +766,16 @@ def _format_output(bz, opt, buglist):
val = ",".join([f["name"] + f["status"]
for f in getattr(b, "flags", [])])
+ elif fieldname == "flags_requestee":
+ tmpstr = []
+ for f in getattr(b, "flags", []):
+ try:
+ tmpstr.append("%s%s%s" %
+ (f['name'], f['status'], f['requestee']))
+ except KeyError:
+ tmpstr.append("%s%s" % (f['name'], f['status']))
+ val = ",".join(tmpstr)
+
elif fieldname == "cve":
cves = []
for key in getattr(b, "keywords", []):
--
1.8.4.2
More information about the python-bugzilla
mailing list