Prechádzať zdrojové kódy

pythonlib/script: tell the name of not found executable

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67155 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 rokov pred
rodič
commit
8d78a49130
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      lib/python/script/core.py

+ 2 - 1
lib/python/script/core.py

@@ -64,7 +64,8 @@ class Popen(subprocess.Popen):
             and kwargs.get('executable') is None):
             cmd = shutil_which(args[0])
             if cmd is None:
-                raise OSError
+                raise OSError(_("Cannot find the executable {}")
+                              .format(args[0]))
             args = [cmd] + args[1:]
             name, ext = os.path.splitext(cmd)
             if ext.lower() not in self._builtin_exts: