Re: [GIT PULL] policycoreutils: fix PEP8 issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/22/2015 10:31 AM, Jason Zaman wrote:
> On Wed, Jul 22, 2015 at 09:15:40AM -0400, Stephen Smalley wrote:
>> On 07/17/2015 10:28 AM, Jason Zaman wrote:
>>> Commit message:
>>>
>>>     policycoreutils: Fix PEP8 issues
>>>
>>>     When trying to get policycoreutils working in python3, I kept running
>>>     into TabErrors:
>>>
>>>         Traceback (most recent call last):
>>>           File "/usr/lib/python-exec/python3.3/semanage", line 27, in <module>
>>>             import seobject
>>>           File "/usr/lib64/python3.3/site-packages/seobject.py", line 154
>>>             context = "%s%s" % (filler, raw)
>>>                                            ^
>>>         TabError: inconsistent use of tabs and spaces in indentation
>>>
>>>     Python3 is a lot stricter than python2 regarding whitespace and looks like
>>>     previous commits mixed the two.  When fixing this, I took the chance to fix
>>>     other PEP8 style issues at the same time.
>>>
>>>     This commit was made using:
>>>     $ file $(find . -type f) | grep -i python > pyfiles
>>>     $ autopep8 --in-place --ignore=E501,E265 $(cat pyfiles)
>>>
>>>     The ignore E501 is long lines since there are many that would be wrapped
>>>     otherwise, and E265 is block comments that start with ## instead of just #.
>>
>> If this was generated entirely via autopep8, I'd prefer to take this
>> other patch series first:
>> http://marc.info/?l=selinux&m=143743932419386&w=2
>> as it will be easier to redo the autopep8 on top than the other way around.
> 
> Yes it was 100% automated, I can re-generate it now that those have been
> applied or I can wait till a bit later once the semanage.py fixes are in
> or you could just run it yourself and commit it. which would you prefer?
> 
> The important part will be to make sure that all commits afterwards are
> also following pep8.

I'll ask if Red Hat has any other patches they care to submit for
policycoreutils python code before performing the conversion.


_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux