Re: updates to find-work

2016-09-06 Thread Emilio Pozuelo Monfort
On 07/09/16 00:01, Brian May wrote:
> Hello,
> 
> Do we have any sort of handle formal updates to find-work?
> 
> If not, does anybody have any objections if I were to commit the
> following change? It adds a --unassigned command line option that only
> lists packages that are not taken by anybody.

Sounds useful! IOW, no objections.

Emilio



updates to find-work

2016-09-06 Thread Brian May
Hello,

Do we have any sort of handle formal updates to find-work?

If not, does anybody have any objections if I were to commit the
following change? It adds a --unassigned command line option that only
lists packages that are not taken by anybody.

Regards

=== cut ===
diff --git a/find-work b/find-work
index 2943623..6ad9142 100755
--- a/find-work
+++ b/find-work
@@ -3,6 +3,7 @@
 # This package depends on the following package(s):
 #python3-requests
 #
+import argparse
 import io
 import requests
 import re
@@ -20,6 +21,11 @@ except ImportError:
 if sys.stdout.encoding != 'UTF-8':
 sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='UTF-8')
 
+parser = argparse.ArgumentParser(description='Find packages needing LTS work')
+parser.add_argument(
+"--unassigned", help="list only untaken packages", action="store_true")
+args = parser.parse_args()
+
 DLA_NEEDED_URL = 'http://anonscm.debian.org/viewvc/secure-testing/' + \
 'data/dla-needed.txt?revision=HEAD=co'
 PKG_RE = r'^(\S+)(?:\s+\((.*)\)\s*)?$'
@@ -67,6 +73,8 @@ with open('packages-to-support') as f:
 if package not in dla_needed:
 continue
 taken_by = dla_needed[package]['taken_by']
+if args.unassigned and taken_by:
+continue
 print (
 "*",
 highlight(package, taken_by),
@@ -82,6 +90,8 @@ print ("Remaining issues are: (no customers have expressed 
need for support yet)
 print ("")
 for pkg in sorted(dla_needed.keys()):
 taken_by = dla_needed[pkg]['taken_by']
+if args.unassigned and taken_by:
+continue
 print (
 "*",
 highlight(pkg, taken_by),
=== cut ===

-- 
Brian May <b...@debian.org>