made license check tolerate non-existing licenses
This commit is contained in:
parent
d6d02b3b5d
commit
84df61d4a0
|
@ -39,6 +39,7 @@ class Environment():
|
|||
'standard':5,
|
||||
'explicit':5}
|
||||
if Nneeded == -1: Nneeded = licensesNeeded[software]
|
||||
try:
|
||||
cmd = """ ssh mulicense2 "/Stat_Flexlm | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software
|
||||
process = subprocess.Popen(shlex.split(cmd),stdout = subprocess.PIPE,stderr = subprocess.PIPE)
|
||||
licenses = map(int, process.stdout.readline().split())
|
||||
|
@ -51,3 +52,5 @@ class Environment():
|
|||
except IndexError:
|
||||
print('Could not retrieve license information for %s'%software)
|
||||
return 127
|
||||
except:
|
||||
return 126
|
||||
|
|
Loading…
Reference in New Issue