aboutsummaryrefslogtreecommitdiffstats
path: root/lib/srtgui
diff options
context:
space:
mode:
Diffstat (limited to 'lib/srtgui')
-rw-r--r--lib/srtgui/api.py3
-rw-r--r--lib/srtgui/views.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/srtgui/api.py b/lib/srtgui/api.py
index 7fbfc1e3..c16b30cc 100644
--- a/lib/srtgui/api.py
+++ b/lib/srtgui/api.py
@@ -82,6 +82,9 @@ def readCveDetails_Upstream(cve, cve_datasource):
# Get the object
lookup_command = cve_datasource.lookup
+ if not lookup_command:
+ v.description = "ERROR(%s):missing lookup command" % (cve_datasource.description)
+ return v
lookup_command = lookup_command.replace('%command%','--cve-detail=%s' % cve.name)
result_returncode,result_stdout,result_stderr = execute_process(lookup_command.split(' '))
#_log("SRT_%s=%s|%s|%s" % (cve_datasource.key,result_returncode,result_stdout,result_stderr))
diff --git a/lib/srtgui/views.py b/lib/srtgui/views.py
index 122d9133..6532dbe1 100644
--- a/lib/srtgui/views.py
+++ b/lib/srtgui/views.py
@@ -990,6 +990,7 @@ def _create_defect(investigation,defect_reason,components):
'--link', links,
)
_log("SRT_DEFECT=%s|%s|%s" % (result_returncode,result_stdout,result_stderr))
+ d_name = ''
if 0 == result_returncode:
_log("SRT_DEFECT3a")
for line in result_stdout.decode("utf-8").splitlines():
@@ -999,7 +1000,9 @@ def _create_defect(investigation,defect_reason,components):
d_name = params[0]
d_url = params[1]
_log("SRT_DEFECT3c|%s|%s|" % (d_name,d_url))
- else:
+ ### TO-DO: Trigger dialog in a production system if not defect created at this point
+ ### For now provide a defect number simulation
+ if not d_name:
# Simulate a unique defect index
current_defect_simulation_index,create = SrtSetting.objects.get_or_create(name='current_defect_simulation_index')
if create: