From: Mike Frysinger Date: Tue, 8 Oct 2013 19:39:53 +0000 (-0400) Subject: chpathtool: use built in %(prog)s for usage X-Git-Tag: v2.2.8~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c3afc0c35143a362970c2e7ef0a700feb1ea15e5;p=portage.git chpathtool: use built in %(prog)s for usage --- diff --git a/bin/chpathtool.py b/bin/chpathtool.py index 471582b9c..b8c6fd5cb 100755 --- a/bin/chpathtool.py +++ b/bin/chpathtool.py @@ -142,9 +142,9 @@ def chpath_inplace_symlink(filename, st, old, new): def main(argv): - usage = '%s [options] ' % (os.path.basename(argv[0],)) + usage = '%(prog)s [options] ' parser = ArgumentParser(usage=usage) - options, args = parser.parse_known_args(argv[1:]) + options, args = parser.parse_known_args(argv) if len(args) != 3: parser.error('3 args required, got %s' % (len(args),)) @@ -186,4 +186,4 @@ def main(argv): return os.EX_OK if __name__ == '__main__': - sys.exit(main(sys.argv)) + sys.exit(main(sys.argv[1:]))