GetWVKeys/wv_cdm_api

check for wv_cvt executable

Closed this issue · 1 comments

check if the wv_cvt executable actually exists when starting the server

import subprocess
import errno
def is_tool(name_):
    try:
        devnull = open(os.devnull)
        subprocess.Popen([name_], stdout=devnull, stderr=devnull).communicate()
    except OSError as e_:
        if e_.errno == errno.ENOENT:
            return False
    return True
if is_tool("wv_cvt.exe"):
    ....

this should do the trick