#54 framework: Make sure local_policy_package is not None
Merged by plautrba. Opened by vmojzis.
vmojzis/setroubleshoot local_policy_rpm  into  master

Download 54.patch

Fixes:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/setroubleshoot/browser.py", line 991, in submit_button_clicked
self.submit()
File "/usr/lib/python3.8/site-packages/setroubleshoot/browser.py", line 1001, in submit
signature = report.createAlertSignature(local_policy_package,
File "/usr/lib64/python3.8/site-packages/report/init.py", line 221, in createAlertSignature
pd.add("component", component)
TypeError: argument 2 must be str, not None

Signed-off-by: Vit Mojzis vmojzis@redhat.com

Resolves: rhbz#1809508

Could you please elaborate a little why it's acceptable to use "None" instead of None? And how does it happen that self.alert.environment.policy_rpm is None?

Could you please elaborate a little why it's acceptable to use "None" instead of None? And how does it happen that self.alert.environment.policy_rpm is None?

As I understand it, "createAlertSignature" expects strings (it probably should be able to detect/deal with other values, but it doesn't)... at first I wanted to replace it by "Unknown", but this is cleaner.

As for self.alert.environment.policy_rpm being None, I expect a miss-configured /etc/selinux/config.

Pull-Request has been merged by plautrba

Metadata