From 0d7f628f3c3ed8d70fd7f0dbdc766019487a6008 Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Mon, 13 Jul 2020 18:52:42 +0200 Subject: [PATCH] fix modeslive --help bug --- pyModeS/streamer/modeslive | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pyModeS/streamer/modeslive b/pyModeS/streamer/modeslive index 47e7b58..168d5c5 100755 --- a/pyModeS/streamer/modeslive +++ b/pyModeS/streamer/modeslive @@ -12,9 +12,6 @@ from pyModeS.streamer.screen import Screen from pyModeS.streamer.source import NetSource, RtlSdrSource -# redirect all stdout to null, avoiding messing up with the screen -sys.stdout = open(os.devnull, "w") - support_rawtypes = ["raw", "beast", "skysense"] parser = argparse.ArgumentParser() @@ -26,8 +23,9 @@ parser.add_argument( ) parser.add_argument( "--connect", - help="Define server, port and data type. Supported data types are: %s" - % support_rawtypes, + help="Define server, port and data type. Supported data types are: {}".format( + support_rawtypes + ), nargs=3, metavar=("SERVER", "PORT", "DATATYPE"), default=None, @@ -86,6 +84,10 @@ if DUMPTO is not None: sys.exit(1) +# redirect all stdout to null, avoiding messing up with the screen +sys.stdout = open(os.devnull, "w") + + raw_pipe_in, raw_pipe_out = multiprocessing.Pipe() ac_pipe_in, ac_pipe_out = multiprocessing.Pipe() exception_queue = multiprocessing.Queue()