Python bindings: open init file in read mode, not read-write

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23773 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2014-01-26 11:47:11 +00:00
parent 66290779a1
commit b5435e7631

View File

@ -79,7 +79,7 @@ libgncmod_python_gnc_module_init(int refcount)
pkgdatadir = gnc_path_get_pkgdatadir();
init_filename = g_build_filename(pkgdatadir, "python/init.py", (char*)NULL);
g_debug("Looking for python init script at %s", (init_filename ? init_filename : "<null>"));
fp = fopen(init_filename, "r+");
fp = fopen(init_filename, "r");
if (fp)
{
PyRun_SimpleFile(fp, init_filename);