Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
python/sepolicy: silence new flake8 warnings
pyflakes 2.2.0 improved the way format strings are analyzed, which
triggers new warnings in flake8:

    python/sepolicy/sepolicy/manpage.py:1046:23: F999 '...' % ... has
    unused named argument(s): type

    python/sepolicy/sepolicy/manpage.py:1225:23: F999 '...' % ... has
    unused named argument(s): user

Remove the unused arguments in order to silence these warnings.

This fixes failures in Travis-CI such as
https://travis-ci.org/github/SELinuxProject/selinux/jobs/686230518#L5153

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Acked-by: William Roberts <william.c.roberts@intel.com>
  • Loading branch information
fishilico authored and bachradsusi committed May 13, 2020
1 parent cc00c7e commit 63bf6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/sepolicy/sepolicy/manpage.py
Expand Up @@ -1074,7 +1074,7 @@ def _user_header(self):
.B semanage login -m -s %(user)s_u __default__
""" % {'desc': self.desc, 'type': self.type, 'user': self.domainname, 'range': self._get_users_range()})
""" % {'desc': self.desc, 'user': self.domainname, 'range': self._get_users_range()})

if "login_userdomain" in self.attributes and "login_userdomain" in self.all_attributes:
self.fd.write("""
Expand Down Expand Up @@ -1245,7 +1245,7 @@ def _transitions(self):
.B $ sesearch -A -s %(type)s -c process -p transition
""" % {'user': self.domainname, 'type': self.type})
""" % {'type': self.type})

def _role_header(self):
self.fd.write('.TH "%(user)s_selinux" "8" "%(user)s" "mgrepl@redhat.com" "%(user)s SELinux Policy documentation"'
Expand Down

0 comments on commit 63bf6af

Please sign in to comment.