diff mbox

[ovs-dev,2/2] checkpatch: Fix running under python3.

Message ID 20170308175407.11142-2-joe@ovn.org
State Accepted
Headers show

Commit Message

Joe Stringer March 8, 2017, 5:54 p.m. UTC
Signed-off-by: Joe Stringer <joe@ovn.org>
---
 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell Bryant March 8, 2017, 7:25 p.m. UTC | #1
On Wed, Mar 8, 2017 at 12:54 PM, Joe Stringer <joe@ovn.org> wrote:
> Signed-off-by: Joe Stringer <joe@ovn.org>
> ---
>  utilities/checkpatch.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index e795646de4a8..a94736d380c2 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -185,7 +185,7 @@ def ovs_checkpatch_parse(text):
>                                re.I | re.M | re.S)
>      skip_line_length_check = False
>
> -    for line in text.split('\n'):
> +    for line in text.decode().split('\n'):
>          if current_file != previous_file:
>              previous_file = current_file
>              if any([fmt in current_file for fmt in line_length_blacklist]):

Acked-by: Russell Bryant <russell@ovn.org>
Joe Stringer March 9, 2017, 8:35 p.m. UTC | #2
On 8 March 2017 at 11:25, Russell Bryant <russell@ovn.org> wrote:
> On Wed, Mar 8, 2017 at 12:54 PM, Joe Stringer <joe@ovn.org> wrote:
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>> ---
>>  utilities/checkpatch.py | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
>> index e795646de4a8..a94736d380c2 100755
>> --- a/utilities/checkpatch.py
>> +++ b/utilities/checkpatch.py
>> @@ -185,7 +185,7 @@ def ovs_checkpatch_parse(text):
>>                                re.I | re.M | re.S)
>>      skip_line_length_check = False
>>
>> -    for line in text.split('\n'):
>> +    for line in text.decode().split('\n'):
>>          if current_file != previous_file:
>>              previous_file = current_file
>>              if any([fmt in current_file for fmt in line_length_blacklist]):
>
> Acked-by: Russell Bryant <russell@ovn.org>

Thanks, applied to master.
diff mbox

Patch

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index e795646de4a8..a94736d380c2 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -185,7 +185,7 @@  def ovs_checkpatch_parse(text):
                               re.I | re.M | re.S)
     skip_line_length_check = False
 
-    for line in text.split('\n'):
+    for line in text.decode().split('\n'):
         if current_file != previous_file:
             previous_file = current_file
             if any([fmt in current_file for fmt in line_length_blacklist]):