diff options
author | James Laska <jlaska@redhat.com> | 2011-03-25 08:08:04 -0400 |
---|---|---|
committer | James Laska <jlaska@redhat.com> | 2011-03-25 08:08:04 -0400 |
commit | abb2b3cf5825435369dbe327a9659eaa94b0b361 (patch) | |
tree | 004a58dfff71c61774c83e2bf7738d8dc7edd066 | |
parent | 7de3c7373f8ebde88fac968e53f68ef9a3a6a549 (diff) | |
download | scripts-abb2b3cf5825435369dbe327a9659eaa94b0b361.tar.gz scripts-abb2b3cf5825435369dbe327a9659eaa94b0b361.tar.xz scripts-abb2b3cf5825435369dbe327a9659eaa94b0b361.zip |
Correct optparse usage.
-rwxr-xr-x | update-blocker-wiki | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/update-blocker-wiki b/update-blocker-wiki index 3e18198..148cad6 100755 --- a/update-blocker-wiki +++ b/update-blocker-wiki @@ -46,7 +46,7 @@ def display_bugs_by_component(bugs_by_component, bugs_by_id): buf = '' components = sorted(bugs_by_component.keys()) for component in components: - buf += '=== %s ===\n' % component + buf += '\n=== %s ===\n' % component # sorted list bugs = sorted(bugs_by_component.get(component,[])) for b in bugs: @@ -56,7 +56,7 @@ def display_bugs_by_component(bugs_by_component, bugs_by_id): def parse_args(): '''Set up the option parser''' - parser = optparse.OptionParser(usage="%prog [options] <action> [options]") + parser = optparse.OptionParser(usage="%prog [options]") parser.add_option('-v', '--verbose', action='store_true', default=False, help='Enable verbosity') parser.add_option('--hotdog', action='store_true', default=False, @@ -174,8 +174,10 @@ if __name__ == '__main__': # Generate page content page_content = ''' -This page generated automatically using [http://fedorapeople.org/gitweb?p=jlaska/public_git/scripts.git %s]. -''' % (sys.argv[0],) + +''This page generated automatically using [http://fedorapeople.org/gitweb?p=jlaska/public_git/scripts.git %s].'' + +''' % (os.path.basename(sys.argv[0]),) # Start with the dog if opts.hotdog: |