Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Added try statement to handle non existing glxinfo. #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions src/octopus/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,20 @@ def getDistribName(self):
def getOpenglVersion(self):
import subprocess
import re
p = subprocess.Popen("glxinfo", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, errors = p.communicate()
outputList = output.split("\n")
for line in outputList:
if "OpenGL version string" in line:
LOGGER.info("found : %s" % line)
oglpattern = re.compile("(\d.\d.\d)")
res = oglpattern.search(line)
self.openglversion = res.group()
break
try:
p = subprocess.Popen("glxinfo", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, errors = p.communicate()
outputList = output.split("\n")
for line in outputList:
if "OpenGL version string" in line:
LOGGER.info("found : %s" % line)
oglpattern = re.compile("(\d.\d.\d)")
res = oglpattern.search(line)
self.openglversion = res.group()
break
except OSError:
LOGGER.warning("No glxinfo present")
self.openglversion = 0

def updateSysInfos(self, ticket):
self.updateSys = True
Expand Down