[GRASS-dev] Re: [GRASS GIS] #1342: grass.core.find_program()
problem with ssh and other
GRASS GIS
trac at osgeo.org
Wed Apr 6 16:41:16 EDT 2011
#1342: grass.core.find_program() problem with ssh and other
---------------------------------+------------------------------------------
Reporter: lucadelu | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Python | Version: svn-trunk
Keywords: python find_program | Platform: Linux
Cpu: Unspecified |
---------------------------------+------------------------------------------
Comment(by glynn):
Replying to [ticket:1342 lucadelu]:
> there are some program that print help message to stderr instead stdout
and this return false instead true in grass.core.find_program().
Whether the program prints anything to either stream is entirely
irrelevant; find_program() simply checks the return code.
In order for find_program() to work, you need to find some invocation
which returns a zero exit status (indicating success). If running the
command with --help is considered an error (non-zero exit status), you'll
need to find some other option. E.g. for ssh, you can use "ssh -V".
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1342#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list