Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Run startup.py only once
Fix #15189
  • Loading branch information
m-kuhn committed Jul 2, 2016
1 parent 459fa8c commit f54d845
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -209,13 +209,6 @@ bool QgsPythonUtilsImpl::checkQgisUser()
return true;
}

void QgsPythonUtilsImpl::doUserImports()
{

QString startuppath = homePythonPath() + " + \"/startup.py\"";
runString( "if os.path.exists(" + startuppath + "): from startup import *\n" );
}

void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
{
init();
Expand All @@ -231,7 +224,6 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
exitPython();
return;
}
doUserImports();
finish();
}

Expand All @@ -257,7 +249,6 @@ void QgsPythonUtilsImpl::initServerPython( QgsServerInterface* interface )
// This is the other main difference with initInterface() for desktop plugins
runString( "qgis.utils.initServerInterface(" + QString::number(( unsigned long ) interface ) + ')' );

doUserImports();
finish();
}

Expand Down
3 changes: 0 additions & 3 deletions src/python/qgspythonutilsimpl.h
Expand Up @@ -126,9 +126,6 @@ class QgsPythonUtilsImpl : public QgsPythonUtils
//@return true if qgis.user could be imported
bool checkQgisUser();

//! import user defined Python code
void doUserImports();

//! cleanup Python context
void finish();

Expand Down

0 comments on commit f54d845

Please sign in to comment.