ubuntu-iso: Use optparse to display --help

This commit is contained in:
Stefano Rivera 2012-05-06 05:18:05 +02:00
parent d69622fa9c
commit 927947841c
3 changed files with 7 additions and 4 deletions

4
debian/changelog vendored
View File

@ -3,8 +3,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
* mk-sbuild: Support kmod, when checking for overlayfs availability.
* pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten
Bezemer. (Closes: #670924, LP: #770529)
* submittodebian, check-mir, check-symbols: Do enough argument parsing to
handle --help (LP: #988009)
* submittodebian, check-mir, check-symbols, ubuntu-iso: Do enough argument
parsing to handle --help (LP: #988009)
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200

View File

@ -20,6 +20,7 @@
#
# ##################################################################
import optparse
import sys
from ubuntutools import subprocess
@ -37,7 +38,10 @@ def extract(iso, path):
return stdout
def main():
isos = sys.argv[1:]
parser = optparse.OptionParser(usage='%prog [options] iso...',
description='Given an ISO, %prog will display the Ubuntu version '
'information')
isos = parser.parse_args()[1]
err = False
for iso in isos:

View File

@ -28,7 +28,6 @@ BLACKLIST = {
'grep-merges': 'No Help',
'pbuilder-dist-simple': 'No Help',
'setup-packaging-environment': 'Throws Error',
'ubuntu-iso': 'No Help',
}
TIMEOUT = 5