My Digital ContributionPosts RSS Comments RSS

Looking for testers for patch for small kernel script

I am trying to get 4-5 signed-off-by people on a small patch for a python script that lives in the scripts directory of the kernel source. If a handful of people from the python team or who others who really know python would not mind taking a look at the patch that would be great. I welcome any constructive criticism.

My goal was to get the patch 2.7 / 3.X compatible. It should apply against most of the later kernels, as this script has not changed in awhile.

Thanks,
Mike

Patch

Update:

Guys, please take a look at the newest patch, I have incorporated the suggested changes.

3 responses so far

3 Responses to “Looking for testers for patch for small kernel script”

  1. Blackb|rdon Jul 17th 2013 at 10:40 pm

    A few things:

    - Don’t use “a” and “b”, use config_a or something similar.

    - Drop the spaces in in front of ( for the print statements.

    - The IOError Except block should state the error:
    try:

    except IOError as e:
    sys.stderr.write(“…” % e)

    Otherwise, an unreadable file (due to, say, permissions) will yield an unhelpful message

    - The last change (adding list() around b.keys()) doesn’t make much sense to me, what’s the point?

  2. Ewoud Kohl van Wijngaardenon Jul 18th 2013 at 1:24 am

    For the print you could use the print_function in __future__, but this requires python 2.6+. For the last part you could write in the modern style: new = sorted(b.keys()).

  3. adminon Jul 18th 2013 at 1:31 am

    @Blackb|rd – thanks! I’ll incorporate your changes and probably bug you again. :)

    @Ewoud – thanks, also. I’ll take a look at your suggestions.

    Appreciate the look, guys.

Leave a Reply