mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-08 22:41:30 +00:00
backportpackage: Add full stops and exclamation marks to error messages.
This commit is contained in:
parent
4afe3c8478
commit
45c5d5206b
@ -42,7 +42,7 @@ def check_call(cmd, *args, **kwargs):
|
|||||||
Logger.command(cmd)
|
Logger.command(cmd)
|
||||||
ret = subprocess.call(cmd, *args, **kwargs)
|
ret = subprocess.call(cmd, *args, **kwargs)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
error('%s returned %d' % (cmd, ret))
|
error('%s returned %d.' % (cmd, ret))
|
||||||
|
|
||||||
def parse(args):
|
def parse(args):
|
||||||
usage = 'Usage: %prog [options] <source package name or .dsc URL/file>'
|
usage = 'Usage: %prog [options] <source package name or .dsc URL/file>'
|
||||||
@ -105,9 +105,9 @@ def parse(args):
|
|||||||
|
|
||||||
opts, args = p.parse_args(args)
|
opts, args = p.parse_args(args)
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
p.error('You must specify a single source package or a .dsc URL/path')
|
p.error('You must specify a single source package or a .dsc URL/path.')
|
||||||
if not opts.upload and not opts.workdir:
|
if not opts.upload and not opts.workdir:
|
||||||
p.error('Please specify either a working dir or an upload target')
|
p.error('Please specify either a working dir or an upload target!')
|
||||||
|
|
||||||
return opts, args
|
return opts, args
|
||||||
|
|
||||||
@ -127,11 +127,11 @@ def find_release_package(lp, package, version, source_release):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
error('Unable to find package %s in release %s' %
|
error('Unable to find package %s in release %s.' %
|
||||||
(package, source_release))
|
(package, source_release))
|
||||||
|
|
||||||
if version and version != srcpkg.source_package_version:
|
if version and version != srcpkg.source_package_version:
|
||||||
error('Requested backport of version %s but %s is at version %s' %
|
error('Requested backport of version %s but %s is at version %s.' %
|
||||||
(version, package, srcpkg.source_package_version))
|
(version, package, srcpkg.source_package_version))
|
||||||
|
|
||||||
return srcpkg
|
return srcpkg
|
||||||
@ -145,7 +145,7 @@ def find_version_package(lp, package, version):
|
|||||||
return archive.getPublishedSources(source_name=package,
|
return archive.getPublishedSources(source_name=package,
|
||||||
version=version)[0]
|
version=version)[0]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
error('Version %s of package %s was never published in Ubuntu' %
|
error('Version %s of package %s was never published in Ubuntu.' %
|
||||||
(version, package))
|
(version, package))
|
||||||
|
|
||||||
def dscurl_from_package(lp, workdir, package, version, source_release):
|
def dscurl_from_package(lp, workdir, package, version, source_release):
|
||||||
@ -162,7 +162,7 @@ def dscurl_from_package(lp, workdir, package, version, source_release):
|
|||||||
if f.endswith('.dsc'):
|
if f.endswith('.dsc'):
|
||||||
return urllib.unquote(f)
|
return urllib.unquote(f)
|
||||||
else:
|
else:
|
||||||
error('Package %s contains no .dsc file' % package)
|
error('Package %s contains no .dsc file.' % package)
|
||||||
|
|
||||||
def dscurl_from_dsc(package):
|
def dscurl_from_dsc(package):
|
||||||
path = os.path.abspath(os.path.expanduser(package))
|
path = os.path.abspath(os.path.expanduser(package))
|
||||||
@ -267,7 +267,7 @@ def main(args):
|
|||||||
distinfo = lsb_release.get_distro_information()
|
distinfo = lsb_release.get_distro_information()
|
||||||
opts.dest_releases = [distinfo['CODENAME']]
|
opts.dest_releases = [distinfo['CODENAME']]
|
||||||
except:
|
except:
|
||||||
error('No destination release specified and unable to guess yours')
|
error('No destination release specified and unable to guess yours.')
|
||||||
|
|
||||||
if opts.workdir:
|
if opts.workdir:
|
||||||
workdir = os.path.expanduser(opts.workdir)
|
workdir = os.path.expanduser(opts.workdir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user