61171038c2
- Log plugin exception traceback when log level is DEBUG - sepolicy.info() returns a generator, not a list (#1784564)
29 lines
978 B
Diff
29 lines
978 B
Diff
From 2b40f9e254ee2514a5ca113620b6761c0a1d2ae6 Mon Sep 17 00:00:00 2001
|
|
From: Petr Lautrbach <plautrba@redhat.com>
|
|
Date: Sat, 11 Jan 2020 10:19:25 +0100
|
|
Subject: [PATCH] framework: sepolicy.info() returns a generator, not a list
|
|
|
|
Fixes:
|
|
$ sealert -a ./short.log
|
|
100% done'generator' object is not subscriptable
|
|
---
|
|
framework/src/setroubleshoot/audit_data.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/framework/src/setroubleshoot/audit_data.py b/framework/src/setroubleshoot/audit_data.py
|
|
index 66986a7adfb0..6f0e1e8166ac 100644
|
|
--- a/framework/src/setroubleshoot/audit_data.py
|
|
+++ b/framework/src/setroubleshoot/audit_data.py
|
|
@@ -713,7 +713,7 @@ class AVC:
|
|
types = wtypes
|
|
for t in types:
|
|
if t in all_attributes:
|
|
- wtypes.extend(info(ATTRIBUTE, t)[0]["types"])
|
|
+ wtypes.extend(next(info(ATTRIBUTE, t))["types"])
|
|
|
|
for t in wtypes:
|
|
if t in all_types:
|
|
--
|
|
2.23.0
|
|
|