From b1f380c75f8a4ea7a4062d3735d190a1dcbc3aaa Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Tue, 28 Jul 2020 14:37:13 +0200 Subject: [PATCH] sepolicy: Fix flake8 warnings in Fedora-only code Fixes: $ PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8 Analyzing 187 Python scripts ./installdir/usr/lib/python3.8/site-packages/sepolicy/manpage.py:720:20: E713 test for membership should be 'not in' ./installdir/usr/lib/python3.8/site-packages/sepolicy/manpage.py:774:17: E117 over-indented ./python/sepolicy/build/lib/sepolicy/manpage.py:720:20: E713 test for membership should be 'not in' ./python/sepolicy/build/lib/sepolicy/manpage.py:774:17: E117 over-indented ./python/sepolicy/sepolicy/manpage.py:720:20: E713 test for membership should be 'not in' ./python/sepolicy/sepolicy/manpage.py:774:17: E117 over-indented The command "PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8" exited with 1. Signed-off-by: Ondrej Mosnacek --- python/sepolicy/sepolicy/manpage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py index f8584436960d..6a3e08fca58c 100755 --- a/python/sepolicy/sepolicy/manpage.py +++ b/python/sepolicy/sepolicy/manpage.py @@ -717,7 +717,7 @@ Default Defined Ports:""") for f in self.all_file_types: if f.startswith(self.domainname): flist.append(f) - if not f in self.exec_types or not f in self.entry_types: + if f not in self.exec_types or f not in self.entry_types: flist_non_exec.append(f) if f in self.fcdict: mpaths = mpaths + self.fcdict[f]["regex"] @@ -771,7 +771,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d """ % {'domainname': self.domainname, 'equiv': e, 'alt': e.split('/')[-1]}) if flist_non_exec: - self.fd.write(r""" + self.fd.write(r""" .PP .B STANDARD FILE CONTEXT -- 2.29.0