diff mbox

[ovs-dev] checkpatch: Fix typo for use as filter.

Message ID 20170601144001.4272-1-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff June 1, 2017, 2:40 p.m. UTC
ovs_checkpatch_parse() takes 2 arguments, not sys.exit().  Oops.

Fixes: 95bd35d3db19 ("checkpatch: Implement -f option more usefully.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aaron Conole June 1, 2017, 8:31 p.m. UTC | #1
Ben Pfaff <blp@ovn.org> writes:

> ovs_checkpatch_parse() takes 2 arguments, not sys.exit().  Oops.
>
> Fixes: 95bd35d3db19 ("checkpatch: Implement -f option more usefully.")
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---

Weird.

  04:26:00 aconole {master} ~/git/ovs$ git log --grep="Implement -f" | grep Date:
  Date:   Fri May 26 11:22:36 2017 -0700
  04:26:01 aconole {master} ~/git/ovs$ rm flake8-check 
  04:26:07 aconole {master} ~/git/ovs$ make flake8-check >/dev/null && echo "WORKING"
  WORKING

Just tried doing an actual commit, instead of an am:

  Traceback (most recent call last):
    File "utilities/checkpatch.py", line 415, in <module>
      sys.exit(ovs_checkpatch_parse(sys.stdin.read()), '-')
  TypeError: ovs_checkpatch_parse() takes exactly 2 arguments (1 given)

:/

Sorry I missed it during my review.

Acked-by: Aaron Conole <aconole@redhat.com>
Ben Pfaff June 1, 2017, 9:22 p.m. UTC | #2
On Thu, Jun 01, 2017 at 04:31:53PM -0400, Aaron Conole wrote:
> Ben Pfaff <blp@ovn.org> writes:
> 
> > ovs_checkpatch_parse() takes 2 arguments, not sys.exit().  Oops.
> >
> > Fixes: 95bd35d3db19 ("checkpatch: Implement -f option more usefully.")
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> 
> Weird.
> 
>   04:26:00 aconole {master} ~/git/ovs$ git log --grep="Implement -f" | grep Date:
>   Date:   Fri May 26 11:22:36 2017 -0700
>   04:26:01 aconole {master} ~/git/ovs$ rm flake8-check 
>   04:26:07 aconole {master} ~/git/ovs$ make flake8-check >/dev/null && echo "WORKING"
>   WORKING
> 
> Just tried doing an actual commit, instead of an am:
> 
>   Traceback (most recent call last):
>     File "utilities/checkpatch.py", line 415, in <module>
>       sys.exit(ovs_checkpatch_parse(sys.stdin.read()), '-')
>   TypeError: ovs_checkpatch_parse() takes exactly 2 arguments (1 given)
> 
> :/
> 
> Sorry I missed it during my review.

No problem, I should have found it myself.

> Acked-by: Aaron Conole <aconole@redhat.com>

I applied this to master.
diff mbox

Patch

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 3ebd53ad06b7..5ca4b9e2f8d3 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -458,5 +458,5 @@  if __name__ == '__main__':
         if sys.stdin.isatty():
             usage()
             sys.exit(-1)
-        sys.exit(ovs_checkpatch_parse(sys.stdin.read()), '-')
+        sys.exit(ovs_checkpatch_parse(sys.stdin.read(), '-'))
     sys.exit(ovs_checkpatch_file(filename))