From: Petr Lautrbach <plautrba@redhat.com>
To: selinux@tycho.nsa.gov
Subject: Re: [GIT PULL] policycoreutils: fix PEP8 issues
Date: Thu, 23 Jul 2015 09:14:47 +0200 [thread overview]
Message-ID: <55B09467.6030807@redhat.com> (raw)
In-Reply-To: <55AFAAD5.80108@tycho.nsa.gov>
[-- Attachment #1: Type: text/plain, Size: 2523 bytes --]
On 07/22/2015 04:38 PM, Stephen Smalley wrote:
> 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.
>
>
I'm just looking into it.
From the top of my head there should be only one other patch in Fedora
which makes a python module seobject/__init__.py from seobject.py for
python3. Other changes are either indentation fixes or should be already
covered by patches sent by my colleagues few days ago.
I hope I'll provide a relevant patch set today.
Petr
--
Petr Lautrbach
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-07-23 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 14:28 [GIT PULL] policycoreutils: fix PEP8 issues Jason Zaman
2015-07-22 13:15 ` Stephen Smalley
2015-07-22 14:31 ` Jason Zaman
2015-07-22 14:38 ` Stephen Smalley
2015-07-23 7:14 ` Petr Lautrbach [this message]
2015-07-24 7:43 ` Petr Lautrbach
2015-07-24 8:13 ` Jason Zaman
2015-07-24 8:35 ` Jason Zaman
2015-07-24 13:09 ` Stephen Smalley
2015-07-24 13:06 ` Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B09467.6030807@redhat.com \
--to=plautrba@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.