Petr Lautrbach
2018-05-04 11:51:46 UTC
From: Vit Mojzis <***@redhat.com>
self.store is always a string (actual store name or "") because of
semanageRecords.__init__. Fix check for not defined store.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1559174#c3
Signed-off-by: Vit Mojzis <***@redhat.com>
---
python/semanage/seobject.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
index ac310ea6..c76dce85 100644
--- a/python/semanage/seobject.py
+++ b/python/semanage/seobject.py
@@ -2651,7 +2651,7 @@ class booleanRecords(semanageRecords):
self.current_booleans = []
ptype = None
- if self.store is None or self.store == ptype:
+ if self.store == "" or self.store == ptype:
self.modify_local = True
else:
self.modify_local = False
self.store is always a string (actual store name or "") because of
semanageRecords.__init__. Fix check for not defined store.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1559174#c3
Signed-off-by: Vit Mojzis <***@redhat.com>
---
python/semanage/seobject.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
index ac310ea6..c76dce85 100644
--- a/python/semanage/seobject.py
+++ b/python/semanage/seobject.py
@@ -2651,7 +2651,7 @@ class booleanRecords(semanageRecords):
self.current_booleans = []
ptype = None
- if self.store is None or self.store == ptype:
+ if self.store == "" or self.store == ptype:
self.modify_local = True
else:
self.modify_local = False
--
2.17.0
2.17.0