From: Petr Lautrbach <plautrba@redhat.com>
To: "Christian Göttsche" <cgzones@googlemail.com>, selinux@vger.kernel.org
Subject: Re: [RFC PATCH] semanage: use instance check
Date: Tue, 08 Aug 2023 12:30:24 +0200 [thread overview]
Message-ID: <87zg31su67.fsf@redhat.com> (raw)
In-Reply-To: <20230807185510.237623-1-cgzones@googlemail.com>
Christian Göttsche <cgzones@googlemail.com> writes:
> Please flake8:
>
> ./python/semanage/seobject.py:250:16: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Thanks, but it's already proposed
https://lore.kernel.org/selinux/20230803134024.20849-1-jwcart2@gmail.com/T/#u
> ---
> This currently breaks the GitHub CI.
> ---
> python/semanage/seobject.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
> index 361205d1..cc944ae2 100644
> --- a/python/semanage/seobject.py
> +++ b/python/semanage/seobject.py
> @@ -247,7 +247,7 @@ class semanageRecords:
> global handle
> if args:
> # legacy code - args was store originally
> - if type(args) == str:
> + if isinstance(args, str):
> self.store = args
> else:
> self.args = args
> --
> 2.40.1
next prev parent reply other threads:[~2023-08-08 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 18:55 [RFC PATCH] semanage: use instance check Christian Göttsche
2023-08-08 10:30 ` Petr Lautrbach [this message]
2023-08-08 18:32 ` James Carter
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=87zg31su67.fsf@redhat.com \
--to=plautrba@redhat.com \
--cc=cgzones@googlemail.com \
--cc=selinux@vger.kernel.org \
/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.