Sfoglia il codice sorgente

pythonlib/script: tell the name of not found executable on Windows (backport 67155)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@67824 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 anni fa
parent
commit
ee7c9cf61b
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      lib/python/script/core.py

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

@@ -55,7 +55,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: