From c3afc0c35143a362970c2e7ef0a700feb1ea15e5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 8 Oct 2013 15:39:53 -0400 Subject: [PATCH] chpathtool: use built in %(prog)s for usage --- bin/chpathtool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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:])) -- 2.26.2