make lp-affects able to add non-release specific tasks
Bug #1807112 reported by
Christian Ehrhardt
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lptools |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
currently lp-affects requires all three arguments
usage: lp-affects-devel [-h] bug package release
But when you add a task on LP quite often you want to just add the package, but not for a given release (e.g. when tracking tasks for the next devel release).
This works fine if we construct the target string slightly different.
We can just make release optional (as in the LP UI) and add it as that if not specified.
To post a comment you must log in.
The following is all that is needed: bin/lp- affects 2018-11-26 15:20:14.606100426 +0100 bin/lp- affects- devel 2018-12-06 09:48:11.193017863 +0100 add_argument( 'package' ,
help='src name to add the task') add_argument( 'release' ,
help='release to mark affected')
--- /home/paelzer/
+++ /home/paelzer/
@@ -13,6 +13,8 @@
parser.
parser.
+ default=None,
+ nargs='?',
args = parser.parse_args()
@@ -22,6 +24,9 @@ login_with( 'affectrelease' , 'production', version='devel')
lp=Launchpad.
bug=lp. bugs[args. bug] "/ubuntu/ %s/+source/ %s" % (args.release, args.package) "/ubuntu/ +source/ %s" % (args.package) "/ubuntu/ %s/+source/ %s" % (args.release, args.package)
-target=
+if args.release is None:
+ target=
+else:
+ target=
bug.addTask( target= target)