Commit bc6b2455 authored by Aleksy Barcz's avatar Aleksy Barcz

i2smo: don't check for executables if this is not a terminal host

+ on non-terminal szarp servers this check issues lots of unnecessary warnings
parent 62cd2813
......@@ -661,11 +661,17 @@ def get_item(ss):
def get_item_params(ss):
return re.findall('\"([^"]*)\"', ss)
def has_szarp_wx():
return os.path.isfile("/opt/szarp/bin/draw3")
def exec_item(i):
p = get_item_params(i)
if len(p) != 2:
printerr("ERROR: wrong number of EXEC parameters (%s) for '%s'" % (len(p), trunc(i)))
return False
# if there is no szarp-wx package, then most probably its a szarp terminal
if not has_szarp_wx():
return True
name = p[0]
comm = p[1].split(' ')[0] # doesn't handle whitespaces in path
if verbose: print nesting_lvl * '\t' + "Checking for %s ..." % comm,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment