fix up the usage output for modifyrepo
authorSeth Vidal <skvidal@fedoraproject.org>
Thu, 7 Oct 2010 20:41:51 +0000 (16:41 -0400)
committerSeth Vidal <skvidal@fedoraproject.org>
Thu, 7 Oct 2010 20:41:51 +0000 (16:41 -0400)
modifyrepo.py

index 58ec930bf0939e173f956553cea527c3245c49a5..17094a4a609f212bac0b2c488d2a0cd9ec409cd8 100755 (executable)
@@ -124,10 +124,11 @@ def main(args):
     # query options
     parser.add_option("--mdtype", dest='mdtype',
                       help="specific datatype of the metadata, will be derived from the filename if not specified")
+    parser.usage = "modifyrepo [options] <input_metadata> <output repodata>"
     
     (opts, argsleft) = parser.parse_args(args)
     if len(argsleft) != 2:
-        print "Usage: %s <input metadata> <output repodata>" % sys.argv[0]
+        parser.print_usage()
         return 0
     metadata = argsleft[0]
     repodir = argsleft[1]