fix graphics

This commit is contained in:
wh1te909 2021-04-11 07:25:37 +00:00
parent 3dd2671380
commit 76ce4296f3
1 changed files with 7 additions and 1 deletions

View File

@ -197,15 +197,21 @@ class Agent(BaseAuditModel):
@property
def graphics(self):
ret = []
ret, mrda = [], []
try:
graphics = self.wmi_detail["graphics"]
for i in graphics:
caption = [x["Caption"] for x in i if "Caption" in x][0]
if "microsoft remote display adapter" in caption.lower():
mrda.append("yes")
continue
ret.append([x["Caption"] for x in i if "Caption" in x][0])
# only return this if no other graphics cards
if not ret and mrda:
return "Microsoft Remote Display Adapter"
return ", ".join(ret)
except:
return "Graphics info requires agent v1.4.14"