[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/05: cleanup: remove nargs=1 from Argumen
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/05: cleanup: remove nargs=1 from ArgumentParser |
Date: |
Sat, 17 Sep 2016 15:44:20 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next
in repository gnuradio.
commit 00aec59017d99db6ca5216e4ca2bb44786c0ed91
Author: Jiří Pinkava <address@hidden>
Date: Sat Sep 17 15:43:26 2016 +0200
cleanup: remove nargs=1 from ArgumentParser
---
gnuradio-runtime/examples/mp-sched/plot_flops.py | 4 ++--
gr-utils/python/utils/gr_plot_const | 4 ++--
gr-utils/python/utils/gr_read_file_metadata | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gnuradio-runtime/examples/mp-sched/plot_flops.py
b/gnuradio-runtime/examples/mp-sched/plot_flops.py
index c80820b..9bd2ff1 100755
--- a/gnuradio-runtime/examples/mp-sched/plot_flops.py
+++ b/gnuradio-runtime/examples/mp-sched/plot_flops.py
@@ -85,10 +85,10 @@ def handle_file(input_filename):
def main():
parser = ArgumentParser()
- parser.add_argument('file', help='Input file', nargs=1)
+ parser.add_argument('file', help='Input file')
args = parser.parse_args()
- handle_file(args.file[0])
+ handle_file(args.file)
if __name__ == '__main__':
diff --git a/gr-utils/python/utils/gr_plot_const
b/gr-utils/python/utils/gr_plot_const
index 28f6a54..653a253 100755
--- a/gr-utils/python/utils/gr_plot_const
+++ b/gr-utils/python/utils/gr_plot_const
@@ -230,11 +230,11 @@ def main():
help="Specify where to start in the file
[default=%(default)r]")
parser.add_argument("-R", "--sample-rate", type=float, default=1.0,
help="Set the sampler rate of the data
[default=%(default)r]")
- parser.add_argument("file", metavar="FILE", nargs=1,
+ parser.add_argument("file", metavar="FILE",
help="Input file with complex samples")
args = parser.parse_args()
- dc = draw_constellation(args.file[0], args)
+ dc = draw_constellation(args.file, args)
if __name__ == "__main__":
try:
diff --git a/gr-utils/python/utils/gr_read_file_metadata
b/gr-utils/python/utils/gr_read_file_metadata
index 2a90768..a05e7ad 100644
--- a/gr-utils/python/utils/gr_read_file_metadata
+++ b/gr-utils/python/utils/gr_read_file_metadata
@@ -76,8 +76,8 @@ if __name__ == "__main__":
parser = ArgumentParser(conflict_handler="resolve",
description=description)
parser.add_argument("-D", "--detached", action="store_true",
help="Used if header is detached.")
- parser.add_argument("file", metavar="FILE", nargs=1,
+ parser.add_argument("file", metavar="FILE",
help="Input file");
args = parser.parse_args()
- main(args.file[0], args.detached)
+ main(args.file, args.detached)