mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-05 21:11:37 +00:00
wrap-and-sort: Use parser.error.
This commit is contained in:
parent
df28e21b54
commit
eff2b11d81
@ -188,15 +188,12 @@ def main():
|
|||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
if len(args) != 0:
|
if len(args) != 0:
|
||||||
print >> sys.stderr, ("%s: Error: Unsupported additional parameters "
|
parser.error("Unsupported additional parameters specified: %s" % \
|
||||||
"specified: %s") % (script_name, ", ".join(args))
|
", ".join(args))
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if not os.path.isdir(options.debian_directory):
|
if not os.path.isdir(options.debian_directory):
|
||||||
print >> sys.stderr, ('%s: Error: Debian directory not found, '
|
parser.error('Debian directory not found, expecting "%s".' % \
|
||||||
'expecting "%s"') % (script_name,
|
|
||||||
options.debian_directory)
|
options.debian_directory)
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
wrap_and_sort(options)
|
wrap_and_sort(options)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user