libselinux: fix flake8 warnings in SWIG-generated code

flake8, a Python linter, complains:

    libselinux/src/selinux.py💯1: F401 'errno' imported but unused
    libselinux/src/selinux.py💯1: F401 'stat' imported but unused
    libselinux/src/selinux.py💯14: E401 multiple imports on one line
    libselinux/src/selinux.py:130:16: E111 indentation is not a multiple of four
    libselinux/src/selinux.py:130:45: E231 missing whitespace after ','

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2018-08-04 14:36:01 +02:00
parent f6e7613bd3
commit 646bdeb939
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0
1 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,8 @@
%pythoncode %{
import shutil, os, errno, stat
import shutil
import os
DISABLED = -1
PERMISSIVE = 0
@ -43,7 +44,7 @@ def chcon(path, context, recursive=False):
if recursive:
for root, dirs, files in os.walk(path):
for name in files + dirs:
lsetfilecon(os.path.join(root,name), context)
lsetfilecon(os.path.join(root, name), context)
def copytree(src, dest):
""" An SELinux-friendly shutil.copytree method """