Commit 4f698cfa authored by gregor herrmann's avatar gregor herrmann

dpt-lp-mass-subscribe: port to python3.

parent 8f41d2e0
......@@ -88,8 +88,8 @@ Suggests: bc,
moreutils,
parallel,
perl-depends,
python,
python-launchpadlib
python3,
python3-launchpadlib
Enhances: lintian
Description: collection of tools to aid packaging Perl modules in Debian
The Debian Perl Group works on packaging Perl modules for Debian. This
......
......@@ -124,6 +124,7 @@ License: Artistic or GPL-1+
Files: scripts/lp-mass-subscribe
Copyright: 2010, Ansgar Burchardt <ansgar@43-1.org>
2012, Nathan Handler <nhandler@ubuntu.com>
2018, gregor herrmann <gregoa@debian.org>
License: ISC
Files: scripts/packagecheck
......
#! /usr/bin/env python
#!/usr/bin/python3
"""
=head1 NAME
......@@ -20,6 +20,7 @@ L<get-ubuntu-packages(1)>.
Copyright 2010, Ansgar Burchardt L<ansgar@43-1.org>
Copyright 2012, Nathan Handler L<nhandler@ubuntu.com>
Copyright 2018, gregor herrmann L<gregoa@debian.org>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
......@@ -52,14 +53,14 @@ packages = map(lambda x: x.strip(), stdin.readlines())
for package_name in packages:
package = distribution.getSourcePackage(name = package_name)
if not package:
print "%s: does not exist (yet)" % package_name
print("{0:s}: does not exist (yet)".format(package_name))
continue
if package.getSubscription(person = person):
print "%s: %s is already subscribed" % (package_name, person_name)
print("{0:s}: {1:s} is already subscribed".format(package_name, person_name))
continue
package.addBugSubscription(subscriber = person)
print "%s: subscribed %s" % (package_name, person_name)
print("{0:s}: subscribed {1:s}".format(package_name, person_name))
# vim:set et sw=2:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment