diff --git a/wrapper-scripts/megaclisas-status b/wrapper-scripts/megaclisas-status index e878c88..7662ae8 100755 --- a/wrapper-scripts/megaclisas-status +++ b/wrapper-scripts/megaclisas-status @@ -1,5 +1,5 @@ #!/usr/bin/python -# $Id: megaclisas-status,v 1.20 2015/03/27 03:12:09 root Exp $ +# $Id: megaclisas-status,v 1.21 2015/03/27 03:21:08 root Exp $ import os import re @@ -11,11 +11,11 @@ tabwdth = 4 #megaclipath = "/opt/MegaRAID/MegaCli/MegaCli64" +def is_exe(fpath): + return os.path.isfile(fpath) and os.access(fpath, os.X_OK) + def which(program): import os - def is_exe(fpath): - return os.path.isfile(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) if fpath: if is_exe(program):