diff mbox series

[09/13] python/sepolgen: use self when accessing members in FilesystemUse

Message ID 20180804194734.12577-10-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show
Series Fix some issues found by flake8 | expand

Commit Message

Nicolas Iooss Aug. 4, 2018, 7:47 p.m. UTC
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 <nicolas.iooss@m4x.org>
---
 python/sepolgen/src/sepolgen/refpolicy.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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))