From: Martin Quinson Date: Fri, 13 Jul 2018 18:11:35 +0000 (+0200) Subject: tesh: better error reporting in one specific failure case X-Git-Tag: v3_21~454 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7e32165748de8fa044ecdfac9315825111d63f84?ds=sidebyside tesh: better error reporting in one specific failure case --- diff --git a/tools/tesh/tesh.py b/tools/tesh/tesh.py index 3bc74483a5..623940706d 100755 --- a/tools/tesh/tesh.py +++ b/tools/tesh/tesh.py @@ -329,6 +329,10 @@ class Cmd(object): except FileNotFoundError: print("["+FileReader().filename+":"+str(self.linenumber)+"] Cannot start '"+args[0]+"': File not found") 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()) + tesh_exit(3) except OSError as osE: if osE.errno == 8: osE.strerror += "\nOSError: [Errno 8] Executed scripts should start with shebang line (like #!/usr/bin/env sh)"