mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
requestsync: Make pylint happier.
This commit is contained in:
parent
08042bf61f
commit
086ca39f10
81
requestsync
81
requestsync
@ -45,44 +45,47 @@ def main():
|
|||||||
# Our usage options.
|
# Our usage options.
|
||||||
usage = ('Usage: %prog [options] '
|
usage = ('Usage: %prog [options] '
|
||||||
'<source package> [<target release> [base version]]')
|
'<source package> [<target release> [base version]]')
|
||||||
p = OptionParser(usage)
|
parser = OptionParser(usage)
|
||||||
|
|
||||||
p.add_option('-d', type='string',
|
parser.add_option('-d', type='string',
|
||||||
dest='dist', default='unstable',
|
dest='dist', default='unstable',
|
||||||
help='Debian distribution to sync from.')
|
help='Debian distribution to sync from.')
|
||||||
p.add_option('-k', type='string',
|
parser.add_option('-k', type='string',
|
||||||
dest='keyid', default=None,
|
dest='keyid', default=None,
|
||||||
help='GnuPG key ID to use for signing report '
|
help='GnuPG key ID to use for signing report '
|
||||||
'(only used when emailing the sync request).')
|
'(only used when emailing the sync request).')
|
||||||
p.add_option('-n', action='store_true',
|
parser.add_option('-n', action='store_true',
|
||||||
dest='newpkg', default=False,
|
dest='newpkg', default=False,
|
||||||
help='Whether package to sync is a new package in Ubuntu.')
|
help='Whether package to sync is a new package in '
|
||||||
p.add_option('--lp', action='store_true',
|
'Ubuntu.')
|
||||||
dest='lpapi', default=False,
|
parser.add_option('--lp', action='store_true',
|
||||||
help='Specify whether to use the LP API for filing '
|
dest='lpapi', default=False,
|
||||||
'the sync request (recommended).')
|
help='Specify whether to use the LP API for filing '
|
||||||
p.add_option('-l', '--lpinstance', metavar='INSTANCE',
|
'the sync request (recommended).')
|
||||||
dest='lpinstance', default=None,
|
parser.add_option('-l', '--lpinstance', metavar='INSTANCE',
|
||||||
help='Launchpad instance to connect to (default: production).')
|
dest='lpinstance', default=None,
|
||||||
p.add_option('-s', action='store_true',
|
help='Launchpad instance to connect to '
|
||||||
dest='sponsorship', default=False,
|
'(default: production).')
|
||||||
help='Force sponsorship')
|
parser.add_option('-s', action='store_true',
|
||||||
p.add_option('-C', action='store_true',
|
dest='sponsorship', default=False,
|
||||||
dest='missing_changelog_ok', default=False,
|
help='Force sponsorship')
|
||||||
help='Allow changelog to be manually filled in when missing')
|
parser.add_option('-C', action='store_true',
|
||||||
p.add_option('-e', action='store_true',
|
dest='missing_changelog_ok', default=False,
|
||||||
dest='ffe', default=False,
|
help='Allow changelog to be manually filled in '
|
||||||
help='Use this after FeatureFreeze for non-bug fix syncs, '
|
'when missing')
|
||||||
'changes default subscription to the appropriate '
|
parser.add_option('-e', action='store_true',
|
||||||
'release team.')
|
dest='ffe', default=False,
|
||||||
p.add_option('--no-conf', action='store_true',
|
help='Use this after FeatureFreeze for non-bug fix '
|
||||||
dest='no_conf', default=False,
|
'syncs, changes default subscription to the '
|
||||||
help="Don't read config files or environment variables")
|
'appropriate release team.')
|
||||||
|
parser.add_option('--no-conf', action='store_true',
|
||||||
|
dest='no_conf', default=False,
|
||||||
|
help="Don't read config files or environment variables")
|
||||||
|
|
||||||
(options, args) = p.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
if not len(args):
|
if not len(args):
|
||||||
p.print_help()
|
parser.print_help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
config = UDTConfig(options.no_conf)
|
config = UDTConfig(options.no_conf)
|
||||||
@ -151,7 +154,7 @@ def main():
|
|||||||
force_base_version = Version(args[2])
|
force_base_version = Version(args[2])
|
||||||
else:
|
else:
|
||||||
print >> sys.stderr, 'E: Too many arguments.'
|
print >> sys.stderr, 'E: Too many arguments.'
|
||||||
p.print_help()
|
parser.print_help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Get the current Ubuntu source package
|
# Get the current Ubuntu source package
|
||||||
@ -177,8 +180,8 @@ def main():
|
|||||||
debian_srcpkg = getDebianSrcPkg(srcpkg, distro)
|
debian_srcpkg = getDebianSrcPkg(srcpkg, distro)
|
||||||
debian_version = Version(debian_srcpkg.getVersion())
|
debian_version = Version(debian_srcpkg.getVersion())
|
||||||
debian_component = debian_srcpkg.getComponent()
|
debian_component = debian_srcpkg.getComponent()
|
||||||
except udtexceptions.PackageNotFoundException, e:
|
except udtexceptions.PackageNotFoundException, error:
|
||||||
print >> sys.stderr, "E: %s" % e
|
print >> sys.stderr, "E: %s" % error
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Stop if Ubuntu has already the version from Debian or a newer version
|
# Stop if Ubuntu has already the version from Debian or a newer version
|
||||||
@ -190,8 +193,8 @@ def main():
|
|||||||
srcpkg, distro)
|
srcpkg, distro)
|
||||||
debian_version = Version(debian_srcpkg.getVersion())
|
debian_version = Version(debian_srcpkg.getVersion())
|
||||||
debian_component = debian_srcpkg.getComponent()
|
debian_component = debian_srcpkg.getComponent()
|
||||||
except udtexceptions.PackageNotFoundException, e:
|
except udtexceptions.PackageNotFoundException, error:
|
||||||
print >> sys.stderr, "E: %s" % e
|
print >> sys.stderr, "E: %s" % error
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if ubuntu_version == debian_version:
|
if ubuntu_version == debian_version:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user