提交 605d94b5 编写于 作者: C Cleber Rosa

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: NCleber Rosa <crosa@redhat.com>
上级 e51acbfa
...@@ -31,13 +31,13 @@ class Parser(argparse.ArgumentParser): ...@@ -31,13 +31,13 @@ class Parser(argparse.ArgumentParser):
prog='avocado-run-testplan', prog='avocado-run-testplan',
description='Tracks manual test plans progress and results') 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') help='Template file with the predefined test plan')
self.add_argument('-o', '--output', self.add_argument('-o', '--output',
help='Output (test plan results) file location') 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 ' help=('A previously saved result file to use. This '
'will show a human readable report for the ' 'will show a human readable report for the '
'given result file')) 'given result file'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册