diff options
author | Rahul Bedarkar <rahul.bedarkar@imgtec.com> | 2016-09-22 00:29:14 +0530 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-10-25 12:43:27 +0200 |
commit | 1b0df8f23c690d9464d82f4d3e57fe2a334b5d98 (patch) | |
tree | 16329f7549de4c949abdb7d9055a80c0794d4f0d /support/scripts/get-developers | |
parent | 8513ffee43f473e8134fa48755837722926123b0 (diff) |
scripts/get-developers: correct type of patches argument
Current type for 'patches' argument is str. It supposed to only
contain names of files.
If we specify FileType as type, then we don't need to open file ourself
and it allows script to read patch from standard input as well.
e.g.
$ git show -1 | ./support/scripts/get-developers -
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts/get-developers')
-rwxr-xr-x | support/scripts/get-developers | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/support/scripts/get-developers b/support/scripts/get-developers index 8b1891d99..83f1e5b9b 100755 --- a/support/scripts/get-developers +++ b/support/scripts/get-developers @@ -5,8 +5,8 @@ import getdeveloperlib def parse_args(): parser = argparse.ArgumentParser() - parser.add_argument('patches', metavar='P', type=str, nargs='*', - help='list of patches') + parser.add_argument('patches', metavar='P', type=argparse.FileType('r'), nargs='*', + help='list of patches (use - to read patches from stdin)') parser.add_argument('-a', dest='architecture', action='store', help='find developers in charge of this architecture') parser.add_argument('-p', dest='package', action='store', |