Skip to content

Commit

Permalink
fix python path setting in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 29, 2012
1 parent b60a63b commit 215e05b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -60,8 +60,8 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )

#ifdef Q_OS_WIN
runString( "oldhome=None" );
runString( "if os.environ.has_key('HOME'): oldhome=os.environ['HOME']" );
runString( "os.environ['HOME']=os.environ['USERPROFILE']" );
runString( "if os.environ.has_key('HOME'): oldhome=os.environ['HOME']\n" );
runString( "os.environ['HOME']=os.environ['USERPROFILE']\n" );
#endif

// construct a list of plugin paths
Expand Down Expand Up @@ -120,7 +120,7 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
runString( "qgis.utils.plugin_paths = [" + pluginpaths.join( "," ) + "]" );

#ifdef Q_OS_WIN
runString( "if oldhome: os.environ['HOME']=oldhome" );
runString( "if oldhome: os.environ['HOME']=oldhome\n" );
#endif

// initialize 'iface' object
Expand Down

0 comments on commit 215e05b

Please sign in to comment.