Received: from goalie.tycho.ncsc.mil (goalie.infosec.tycho.ncsc.mil [144.51.242.250]) by tarius.infosec.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w74JmZoS007487 for ; Sat, 4 Aug 2018 15:48:43 -0400 Received: from localhost.localdomain (89-156-252-9.rev.numericable.fr [89.156.252.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 6DDC9561220 for ; Sat, 4 Aug 2018 21:48:08 +0200 (CEST) From: Nicolas Iooss To: selinux@tycho.nsa.gov Date: Sat, 4 Aug 2018 21:47:30 +0200 Message-Id: <20180804194734.12577-10-nicolas.iooss@m4x.org> In-Reply-To: <20180804194734.12577-1-nicolas.iooss@m4x.org> References: <20180804194734.12577-1-nicolas.iooss@m4x.org> Subject: [PATCH 09/13] python/sepolgen: use self when accessing members in FilesystemUse List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: This silences the following flake8 errors: python/sepolgen/src/sepolgen/refpolicy.py:758:25: F821 undefined name 'XATTR' python/sepolgen/src/sepolgen/refpolicy.py:760:27: F821 undefined name 'TRANS' python/sepolgen/src/sepolgen/refpolicy.py:762:27: F821 undefined name 'TASK' Signed-off-by: Nicolas Iooss --- python/sepolgen/src/sepolgen/refpolicy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py index c30a8c70f9ca..e3dd33a21935 100644 --- a/python/sepolgen/src/sepolgen/refpolicy.py +++ b/python/sepolgen/src/sepolgen/refpolicy.py @@ -755,11 +755,11 @@ class FilesystemUse(Leaf): def to_string(self): s = "" - if self.type == XATTR: + if self.type == self.XATTR: s = "fs_use_xattr " - elif self.type == TRANS: + elif self.type == self.TRANS: s = "fs_use_trans " - elif self.type == TASK: + elif self.type == self.TASK: s = "fs_use_task " return "%s %s %s;" % (s, self.filesystem, str(self.context)) -- 2.18.0