Skip to content
Permalink
Browse files

Run startup.py only once

Fix #15189
  • Loading branch information
m-kuhn committed Jul 11, 2016
1 parent ddf98bc commit 729fc49319bbb439094f5186e9b88c792f551c8f
Showing with 0 additions and 12 deletions.
  1. +0 −9 src/python/qgspythonutilsimpl.cpp
  2. +0 −3 src/python/qgspythonutilsimpl.h
@@ -202,13 +202,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();
@@ -224,7 +217,6 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
exitPython();
return;
}
doUserImports();
finish();
}

@@ -250,7 +242,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();
}

@@ -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();

0 comments on commit 729fc49

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