mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-18 04:11:29 +00:00
backportpackage: Minor cleanup identified by pylint
This commit is contained in:
parent
ccb14b6831
commit
3ae9fea935
@ -88,7 +88,7 @@ def parse(args):
|
|||||||
|
|
||||||
return opts, args
|
return opts, args
|
||||||
|
|
||||||
def find_release_package(workdir, package, opts):
|
def find_release_package(package, opts):
|
||||||
ubuntu = lp.distributions['ubuntu']
|
ubuntu = lp.distributions['ubuntu']
|
||||||
archive = ubuntu.main_archive
|
archive = ubuntu.main_archive
|
||||||
series = ubuntu.getSeries(name_or_version=opts.source_release)
|
series = ubuntu.getSeries(name_or_version=opts.source_release)
|
||||||
@ -113,7 +113,7 @@ def find_release_package(workdir, package, opts):
|
|||||||
|
|
||||||
return srcpkg
|
return srcpkg
|
||||||
|
|
||||||
def find_version_package(workdir, package, opts):
|
def find_version_package(package, opts):
|
||||||
ubuntu = lp.distributions['ubuntu']
|
ubuntu = lp.distributions['ubuntu']
|
||||||
archive = ubuntu.main_archive
|
archive = ubuntu.main_archive
|
||||||
try:
|
try:
|
||||||
@ -127,7 +127,6 @@ def find_version_package(workdir, package, opts):
|
|||||||
|
|
||||||
def fetch_package(workdir, package, opts):
|
def fetch_package(workdir, package, opts):
|
||||||
# Returns the path to the .dsc file that was fetched
|
# Returns the path to the .dsc file that was fetched
|
||||||
ubuntu = lp.distributions['ubuntu']
|
|
||||||
|
|
||||||
if not opts.source_release and not opts.version:
|
if not opts.source_release and not opts.version:
|
||||||
opts.source_release = lp.distributions['ubuntu'].current_series.name
|
opts.source_release = lp.distributions['ubuntu'].current_series.name
|
||||||
@ -135,9 +134,9 @@ def fetch_package(workdir, package, opts):
|
|||||||
# If source_release is specified, then version is just for
|
# If source_release is specified, then version is just for
|
||||||
# verification
|
# verification
|
||||||
if opts.source_release:
|
if opts.source_release:
|
||||||
srcpkg = find_release_package(workdir, package, opts)
|
srcpkg = find_release_package(package, opts)
|
||||||
else:
|
else:
|
||||||
srcpkg = find_version_package(workdir, package, opts)
|
srcpkg = find_version_package(package, opts)
|
||||||
|
|
||||||
for f in srcpkg.sourceFileUrls():
|
for f in srcpkg.sourceFileUrls():
|
||||||
if f.endswith('.dsc'):
|
if f.endswith('.dsc'):
|
||||||
@ -206,7 +205,7 @@ def do_backport(workdir, package, dscfile, release, opts):
|
|||||||
'--force-bad-version',
|
'--force-bad-version',
|
||||||
'--preserve',
|
'--preserve',
|
||||||
'--newversion', bp_version,
|
'--newversion', bp_version,
|
||||||
'--distribution', release,
|
'--distribution', bp_dist,
|
||||||
'No-change backport to %s' % release],
|
'No-change backport to %s' % release],
|
||||||
cwd=srcdir)
|
cwd=srcdir)
|
||||||
check_call(['debuild', '-S', '-sa'],
|
check_call(['debuild', '-S', '-sa'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user