summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mga-advisor.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mga-advisor.py b/mga-advisor.py
index 03d5f05..ce99345 100644
--- a/mga-advisor.py
+++ b/mga-advisor.py
@@ -100,7 +100,7 @@ class Widget(QWidget):
mb.exec()
return
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
- url = os.path.join(BASE_URL, self.ui.bug_le.text()) + "?include_fields=cf_rpmpkg,cf_cve,url"
+ url = os.path.join(BASE_URL, self.ui.bug_le.text()) + "?include_fields=cf_rpmpkg,cf_cve,url,component"
headers = {'Accept': 'application/json'}
r = requests.get(url, headers=headers)
if r.status_code == 200 and r.json()["faults"] == []:
@@ -132,6 +132,11 @@ class Widget(QWidget):
url = url.strip()
if url != "":
self.ui.list_ref.addItem(url)
+ if "component" in r.json()['bugs'][0].keys():
+ if r.json()['bugs'][0]["component"] == "Security":
+ self.ui.security_rb.setChecked(True)
+ else:
+ self.ui.bugfix_rb.setChecked(True)
else:
self.ui.status.setText("No info retreived")
QTimer.singleShot(5000, self.clean_status)
@@ -172,6 +177,7 @@ class Widget(QWidget):
self.ui.list_cve.takeItem(self.ui.list_cve.currentRow())
def adv_text(self):
+ # https://stackoverflow.com/questions/74955147/how-to-add-literal-string-pattern-in-pyyaml-with-chomping-indicator
def change_style(style, representer):
def new_representer(dumper, data):
scalar = representer(dumper, data)