From: Martin Quinson Date: Mon, 10 Sep 2018 20:30:49 +0000 (+0200) Subject: tesh: informative message for another error condition X-Git-Tag: v3_21~107 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/354bae5c97ed38def3dbccad01619042a7308584 tesh: informative message for another error condition --- diff --git a/tools/tesh/tesh.py b/tools/tesh/tesh.py index 59e5751d05..b75ab27e84 100755 --- a/tools/tesh/tesh.py +++ b/tools/tesh/tesh.py @@ -326,6 +326,10 @@ class Cmd(object): except OSError: # os.getpgid failed. OK. No cleanup. pass + except PermissionError: + print("["+FileReader().filename+":"+str(self.linenumber)+"] Cannot start '"+args[0]+"': The binary is not executable.") + print("["+FileReader().filename+":"+str(self.linenumber)+"] Current dir: "+os.getcwd()) + tesh_exit(3) except NotADirectoryError: print("["+FileReader().filename+":"+str(self.linenumber)+"] Cannot start '"+args[0]+"': The path to binary does not exist.") print("["+FileReader().filename+":"+str(self.linenumber)+"] Current dir: "+os.getcwd())