From 605d94b5e3f98d17ac70bb8cf7ed304789fae591 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Tue, 19 Dec 2017 22:48:46 -0500 Subject: [PATCH] scripts/avocado-run-testplan: use argparse.FileType Which is the preferred way of saying that a parameter is a file, and, makes pylint happy on Python 3. Signed-off-by: Cleber Rosa --- scripts/avocado-run-testplan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/avocado-run-testplan b/scripts/avocado-run-testplan index ef89b3bd..301c7e4c 100755 --- a/scripts/avocado-run-testplan +++ b/scripts/avocado-run-testplan @@ -31,13 +31,13 @@ class Parser(argparse.ArgumentParser): prog='avocado-run-testplan', description='Tracks manual test plans progress and results') - self.add_argument('-t', '--template', type=file, + self.add_argument('-t', '--template', type=argparse.FileType('r'), help='Template file with the predefined test plan') self.add_argument('-o', '--output', help='Output (test plan results) file location') - self.add_argument('-i', '--input', type=file, + self.add_argument('-i', '--input', type=argparse.FileType('r'), help=('A previously saved result file to use. This ' 'will show a human readable report for the ' 'given result file')) -- GitLab