Skip to content

Commit fdd9894

Browse files
committed
GRASS py modules returns 1 getting interface description (fix 4667)
1 parent 35cd0b9 commit fdd9894

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/grass/qgsgrassmodule.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,12 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(
336336

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

0 commit comments

Comments
 (0)