Skip to content
Snippets Groups Projects
Commit 1d83845a authored by Malo Rosemeier's avatar Malo Rosemeier
Browse files

check whether xvfb is installed

parent 236449d7
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,11 @@ import commands
import sys
def cmd_exists(cmd):
return subprocess.call("type " + cmd, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
class FINSTRIPWrapper(object):
'''
A basic wrapper for FINSTRIP that provides three primary functionalities:
......@@ -76,6 +81,11 @@ class FINSTRIPWrapper(object):
'''
status('FINSTRIPWrapper: Start FINSTRIP execution')
# check if xvfb is installed
if not cmd_exists('xvfb-run'):
raise RuntimeError(
'xvfb is not installed on the system. Please do sudo apt-get install xvfb')
self.finstrip_work_dir = os.getcwd()
# create execution command
cmd_list = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment