Skip to content
Permalink
Browse files

Merge pull request #9541 from qgis/backport-9537-on-release-3_6

Backport #9537 on release-3_6
  • Loading branch information
m-kuhn committed Mar 18, 2019
2 parents 4e5888d + 4a36874 commit c458a53a5336e7046fa9020d1c6c2d75019036a2
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/main.cpp
@@ -1386,7 +1386,7 @@ int main( int argc, char *argv[] )
//replace backslashes with forward slashes
pythonfile.replace( '\\', '/' );
#endif
QgsPythonRunner::run( QStringLiteral( "exec(open('%1').read())" ).arg( pythonfile ) );
QgsPythonRunner::run( QStringLiteral( "with open('%1','r') as f: exec(f.read())" ).arg( pythonfile ) );
}

/////////////////////////////////`////////////////////////////////////

0 comments on commit c458a53

Please sign in to comment.
You can’t perform that action at this time.