Skip to content

Commit

Permalink
core: Fix OBS version reported as unparseable
Browse files Browse the repository at this point in the history
  • Loading branch information
Penwy authored and RytoEX committed Apr 30, 2024
1 parent 57ef9b8 commit 6e8eb2b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions checks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,15 @@ def checkCPU(lines):

def getOBSVersionLine(lines):
versionLines = search('OBS', lines)
correctLine = 0
if 'uploaded' in versionLines[correctLine]:
correctLine += 1
if 'already running' in versionLines[correctLine]:
correctLine += 1
if 'multiple instances' in versionLines[correctLine]:
correctLine += 1
if 'windows from screen capture' in versionLines[correctLine]:
correctLine += 1
if 'Lenovo Vantage / Legion Edge is installed' in versionLines[correctLine]:
correctLine += 1
return versionLines[correctLine]
wrongLines = ('uploaded',
'already running',
'multiple instances',
'windows from screen capture',
'Lenovo Vantage / Legion Edge is installed')
for line in versionLines:
if not any(wrongLine in line for wrongLine in wrongLines):
return line
return versionLines[-1]


def getOBSVersionString(lines):
Expand Down

0 comments on commit 6e8eb2b

Please sign in to comment.