Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id BDAB1E00C1D; Tue, 1 Mar 2016 08:38:58 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.194 listed in list.dnswl.org] Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 78A95E00C3B for ; Tue, 1 Mar 2016 08:38:55 -0800 (PST) Received: by mail-qk0-f194.google.com with SMTP id u128so6504098qkh.1 for ; Tue, 01 Mar 2016 08:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pD4+tNt0+jTKJF15BX0CJj7mcSMmLkvLpWqmAVp8tLk=; b=DFv/wtI2g/q1T/Ub8qMcerSD/c9405/Zy+qJtQ4sb2/SWYNck4Tcy/1oyQtI+JROVe P+rS7XaJlfbQ2yru3PpEhpIlTGceGQeQWcqMHcUwvvXwo5wiS6IW3mP/5ebCOOzij1py jAVBzhU2YsCtyNz8LCgIbOpsPWL0yEkjRHq3zI4bhZz2ZCV1dbJxvDfA0ShE8Uhvm2AL qWyqB82P/WWAVtTg+iu1M9UdxdejZR7/1C8Z5T5oNhS5smOa8jX37OWoUs1+9ckEKZnx 4jv8QHR44viRpyQexCGVfi9wMHtvliHh3r6MbW0uMLWmuc14bCWi50NB1NucEzk9hVBi J+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=pD4+tNt0+jTKJF15BX0CJj7mcSMmLkvLpWqmAVp8tLk=; b=XvWnLw2bP269rOLqyRJ6bWGcczKSiiCDJNx0qoP3hiJvNwPOZyQvSu1ksSXXJTBw+G 2BiafMRqRU/p2ltfHKHMyRgS6fXl9GLJ7ebgKsCHfPe9atp4m0/Q5WvZJXaJm+8X1rys JSNhA6qixYvUbYkn0INgIqIdXvEYvszL9ErF4j4R8s1BsUiOIm0hQcLqHXLFSNO2FA1o Bm/F7b1nP01AU4x8mYJNONTviH2J+bipudXUujJ7YaWAorSoDhOBkocQdaQeHbCrhBTD 6hMdAZMKtYOf/V2EtJFO5zeIiXOs4RlACsHfaGvTcWsyk6BYGq4unUmL1Bgth23pZJSA VLEw== X-Gm-Message-State: AD7BkJLbaAGfSVMZQwXCJv1/OHmxi6jQqQUwPCgaPxeOlvB5wcc422AgnmuCVUCCmGkZyQ== X-Received: by 10.55.18.168 with SMTP id 40mr26964217qks.99.1456850335466; Tue, 01 Mar 2016 08:38:55 -0800 (PST) Received: from ldnunes.lab.ossystems.com.br ([179.105.251.106]) by smtp.gmail.com with ESMTPSA id j135sm13201351qhc.21.2016.03.01.08.38.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 08:38:55 -0800 (PST) Sender: Lucas Nunes From: Lucas Dutra Nunes To: meta-freescale@yoctoproject.org Date: Tue, 1 Mar 2016 13:38:32 -0300 Message-Id: <1456850312-22004-3-git-send-email-ldnunes@ossystems.com.br> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456850312-22004-1-git-send-email-ldnunes@ossystems.com.br> References: <1456850312-22004-1-git-send-email-ldnunes@ossystems.com.br> Subject: [Documentation][PATCH 3/3] scripts: output error messages to stderr X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 16:38:58 -0000 Signed-off-by: Lucas Dutra Nunes --- scripts/format_machine_list.py | 2 +- scripts/generate-bugs-table.py | 7 ++++--- scripts/test-sheet-parser.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/format_machine_list.py b/scripts/format_machine_list.py index 07f1437..778d4fc 100755 --- a/scripts/format_machine_list.py +++ b/scripts/format_machine_list.py @@ -14,7 +14,7 @@ def read_csv_file(csv_file): reader = csv.reader(csv_fd, delimiter=',') return list(reader) except IOError: - print('Could not read %s. Aborting.') % csv_file + sys.stderr.write('Could not read %s. Aborting.\n') % csv_file sys.exit(1) diff --git a/scripts/generate-bugs-table.py b/scripts/generate-bugs-table.py index 8f82bde..e9829bd 100755 --- a/scripts/generate-bugs-table.py +++ b/scripts/generate-bugs-table.py @@ -115,9 +115,10 @@ def process_arguments(): try: time.strptime(start_date, "%Y-%m-%d") except ValueError: - print(os.path.basename(sys.argv[0]) + - ": error: start_date must be in the following format: " + - "YYYY-MM-DD") + msg = (os.path.basename(sys.argv[0]) + + ": error: start_date must be in the following format: " + + "YYYY-MM-DD") + sys.stderr.write(msg) exit(1) print(start_processing_message) diff --git a/scripts/test-sheet-parser.py b/scripts/test-sheet-parser.py index 17dded3..bb6f5da 100755 --- a/scripts/test-sheet-parser.py +++ b/scripts/test-sheet-parser.py @@ -49,7 +49,7 @@ def read_test_sheet(csv_file): reader = csv.reader(csv_fd, delimiter=',') return list(reader) except IOError: - print('Could not read %s. Aborting.') % csv_file + sys.stderr.write('Could not read %s. Aborting.\n') % csv_file sys.exit(1) def parse_board_file(board_file): @@ -65,7 +65,7 @@ def parse_board_file(board_file): board_spec['soc'] = get_descr(line) return board_spec except IOError: - print('Could not read %s.') % board_file + sys.stderr.write('Could not read %s.\n') % board_file def get_supported_boards(repos_dir): -- 2.1.4