Skip to content

Commit

Permalink
GRASS py modules returns 1 getting interface description (fix 4667)
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Jan 17, 2012
1 parent 35cd0b9 commit fdd9894
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -336,10 +336,12 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(

// ? Does binary on Win need .exe extension ?
// Return code 255 (-1) was correct in GRASS < 6.1.0
// Return code 1 is the value (correct?) .py modules actually returns (see #4667)
if ( !process.waitForStarted()
|| !process.waitForReadyRead()
|| !process.waitForFinished()
|| ( process.exitCode() != 0 && process.exitCode() != 255 ) )
|| ( process.exitCode() != 0 && process.exitCode() != 255 &&
( !cmd.endsWith( ".py" ) || process.exitCode() != 1 ) ) )
{
QgsDebugMsg( "process.exitCode() = " + QString::number( process.exitCode() ) );
QMessageBox::warning( 0, tr( "Warning" ),
Expand Down

0 comments on commit fdd9894

Please sign in to comment.