2021-09-29 16:18:29 +00:00
|
|
|
From 0e40b5541773c6daf58bba7048fae6918d74de74 Mon Sep 17 00:00:00 2001
|
2020-11-03 15:52:33 +00:00
|
|
|
From: Ondrej Mosnacek <omosnace@redhat.com>
|
|
|
|
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 <omosnace@redhat.com>
|
|
|
|
---
|
|
|
|
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
|
2021-01-20 19:44:33 +00:00
|
|
|
index ffcedb547993..c013c0d48502 100755
|
2020-11-03 15:52:33 +00:00
|
|
|
--- a/python/sepolicy/sepolicy/manpage.py
|
|
|
|
+++ b/python/sepolicy/sepolicy/manpage.py
|
2021-01-20 19:44:33 +00:00
|
|
|
@@ -719,7 +719,7 @@ Default Defined Ports:""")
|
2020-11-03 15:52:33 +00:00
|
|
|
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"]
|
2021-01-20 19:44:33 +00:00
|
|
|
@@ -773,7 +773,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
|
2020-11-03 15:52:33 +00:00
|
|
|
""" % {'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
|
|
|
|
|
|
|
|
--
|
2021-07-28 17:10:43 +00:00
|
|
|
2.32.0
|
2020-11-03 15:52:33 +00:00
|
|
|
|